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';
|
||||||
|
|
||||||
|
if(pmbstowcs_s) {
|
||||||
|
/* crashes on some systems */
|
||||||
errno = 0xdeadbeef;
|
errno = 0xdeadbeef;
|
||||||
ret = mbstowcs(wOut, NULL, 4);
|
ret = mbstowcs(wOut, NULL, 4);
|
||||||
ok(ret == -1, "mbstowcs did not return -1\n");
|
ok(ret == -1, "mbstowcs did not return -1\n");
|
||||||
ok(errno == EINVAL, "errno = %d\n", errno);
|
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