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:
parent
cb6bcd0028
commit
eb8a6f70f5
|
@ -285,8 +285,8 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar)
|
||||||
ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError());
|
ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError());
|
||||||
|
|
||||||
/* Double-byte tests */
|
/* Double-byte tests */
|
||||||
ret = WideCharToMultiByte(1252, 0, dbwcs, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar);
|
ret = WideCharToMultiByte(1252, 0, dbwcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar);
|
||||||
ok(ret == 5, "ret is %d\n", ret);
|
ok(ret == 3, "ret is %d\n", ret);
|
||||||
ok(!strcmp(mbs, "??"), "mbs is %s\n", mbs);
|
ok(!strcmp(mbs, "??"), "mbs is %s\n", mbs);
|
||||||
if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar);
|
if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue