mscms/tests: Avoid accessing uninitialized memory.

Found by valgrind.
This commit is contained in:
Hans Leidekker 2009-10-21 13:17:24 +02:00 committed by Alexandre Julliard
parent f951deec6f
commit 7c05c62419
1 changed files with 5 additions and 2 deletions

View File

@ -593,10 +593,13 @@ static void test_GetStandardColorSpaceProfileW(void)
SetLastError(0xfaceabee); /* maybe 2nd param. */ SetLastError(0xfaceabee); /* maybe 2nd param. */
ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP); ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP);
WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL);
if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
else ok( !lstrcmpiA( newprofileA, empty ) && GetLastError() == 0xfaceabee, else
{
WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL);
ok( !lstrcmpiA( newprofileA, empty ) && GetLastError() == 0xfaceabee,
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
}
/* Functional checks */ /* Functional checks */