Commit 1d4ac6dc authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt/tests: Fix crash in mbstowcs tests.

parent 8d426f53
......@@ -1635,10 +1635,13 @@ static void test_mbstowcs(void)
wOut[4] = '!'; wOut[5] = '\0';
mOut[4] = '!'; mOut[5] = '\0';
errno = 0xdeadbeef;
ret = mbstowcs(wOut, NULL, 4);
ok(ret == -1, "mbstowcs did not return -1\n");
ok(errno == EINVAL, "errno = %d\n", errno);
if(pmbstowcs_s) {
/* crashes on some systems */
errno = 0xdeadbeef;
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);
ok(ret == 4, "mbstowcs did not return 4\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment