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

This commit is contained in:
Paul Vriens 2009-02-20 08:37:31 +01:00 committed by Alexandre Julliard
parent ad9fb647b4
commit e0157f424b
1 changed files with 17 additions and 4 deletions

View File

@ -244,11 +244,24 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path)
}
else if (depth == 1)
{
ptr = strstr(ffd.cFileName, "__");
char culture[MAX_PATH];
ptr = strstr(ffd.cFileName, "_");
*ptr = '\0';
ptr += 2;
sprintf(buf, "Version=%s, Culture=neutral, PublicKeyToken=%s",
ffd.cFileName, ptr);
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);
lstrcatA(disp, buf);