msvcrt/tests: Fix crash in mbstowcs tests.
This commit is contained in:
parent
8d426f5398
commit
1d4ac6dc1e
|
@ -1635,10 +1635,13 @@ static void test_mbstowcs(void)
|
||||||
wOut[4] = '!'; wOut[5] = '\0';
|
wOut[4] = '!'; wOut[5] = '\0';
|
||||||
mOut[4] = '!'; mOut[5] = '\0';
|
mOut[4] = '!'; mOut[5] = '\0';
|
||||||
|
|
||||||
errno = 0xdeadbeef;
|
if(pmbstowcs_s) {
|
||||||
ret = mbstowcs(wOut, NULL, 4);
|
/* crashes on some systems */
|
||||||
ok(ret == -1, "mbstowcs did not return -1\n");
|
errno = 0xdeadbeef;
|
||||||
ok(errno == EINVAL, "errno = %d\n", errno);
|
ret = mbstowcs(wOut, NULL, 4);
|
||||||
|
ok(ret == -1, "mbstowcs did not return -1\n");
|
||||||
|
ok(errno == EINVAL, "errno = %d\n", errno);
|
||||||
|
}
|
||||||
|
|
||||||
ret = mbstowcs(NULL, mSimple, 0);
|
ret = mbstowcs(NULL, mSimple, 0);
|
||||||
ok(ret == 4, "mbstowcs did not return 4\n");
|
ok(ret == 4, "mbstowcs did not return 4\n");
|
||||||
|
|
Loading…
Reference in New Issue