kernel32/tests: Fix a wrong length passed to a WideCharToMultiByte test, which led to a use of uninitialized stack memory.

This commit is contained in:
Colin Finck 2008-07-31 19:49:52 +02:00 committed by Alexandre Julliard
parent cb6bcd0028
commit eb8a6f70f5
1 changed files with 2 additions and 2 deletions

View File

@ -285,8 +285,8 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar)
ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError());
/* Double-byte tests */
ret = WideCharToMultiByte(1252, 0, dbwcs, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar);
ok(ret == 5, "ret is %d\n", ret);
ret = WideCharToMultiByte(1252, 0, dbwcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar);
ok(ret == 3, "ret is %d\n", ret);
ok(!strcmp(mbs, "??"), "mbs is %s\n", mbs);
if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar);