Commit e0157f42 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

fusion/tests: Don't crash if we have a culture attribute.

parent ad9fb647
...@@ -244,11 +244,24 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path) ...@@ -244,11 +244,24 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path)
} }
else if (depth == 1) else if (depth == 1)
{ {
ptr = strstr(ffd.cFileName, "__"); char culture[MAX_PATH];
ptr = strstr(ffd.cFileName, "_");
*ptr = '\0'; *ptr = '\0';
ptr += 2; ptr++;
sprintf(buf, "Version=%s, Culture=neutral, PublicKeyToken=%s",
ffd.cFileName, ptr); if (*ptr != '_')
{
lstrcpyA(culture, ptr);
*strstr(culture, "_") = '\0';
}
else
lstrcpyA(culture, "neutral");
ptr = strchr(ptr, '_');
ptr++;
sprintf(buf, "Version=%s, Culture=%s, PublicKeyToken=%s",
ffd.cFileName, culture, ptr);
lstrcpyA(disp, parent); lstrcpyA(disp, parent);
lstrcatA(disp, buf); lstrcatA(disp, buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment