msi/tests: Fix a test failure on Win95.

This commit is contained in:
Paul Vriens 2009-03-03 08:43:26 +01:00 committed by Alexandre Julliard
parent f85a7b16ca
commit fca2626768
1 changed files with 6 additions and 0 deletions

View File

@ -7775,6 +7775,12 @@ static void test_appsearch_reglocator(void)
ok(!lstrcmpA(prop, "#-42"), "Expected \"#-42\", got \"%s\"\n", prop);
size = ExpandEnvironmentStringsA("%PATH%", NULL, 0);
if (size == 0 && GetLastError() == ERROR_INVALID_PARAMETER)
{
/* Workaround for Win95 */
CHAR tempbuf[1];
size = ExpandEnvironmentStringsA("%PATH%", tempbuf, 0);
}
pathvar = HeapAlloc(GetProcessHeap(), 0, size);
ExpandEnvironmentStringsA("%PATH%", pathvar, size);