Commit 5d5f11c0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Support z length modifier in scanf.

parent 6049cc86
......@@ -281,6 +281,11 @@ _FUNCTION_ {
format += 2;
}
break;
#if _MSVCR_VER == 0 || _MSVCR_VER >= 140
case 'z':
if (sizeof(void *) == sizeof(LONGLONG)) I64_prefix = 1;
break;
#endif
default:
prefix_finished = 1;
}
......
......@@ -48,6 +48,7 @@ static void test_sscanf(void)
float ret_float1, ret_float2;
double double_res;
unsigned int i;
size_t ret_size;
static const unsigned int tests[] =
{
......@@ -289,6 +290,12 @@ static void test_sscanf(void)
ret = vsscanf_wrapper(tests[i], "infi", -1, "%lf%n", &double_res, &count);
ok(ret == -1, "sscanf returned %d for flags %#x\n", ret, tests[i]);
ret_size = ~0;
ret = vsscanf_wrapper(tests[i], "1", -1, "%zd", &ret_size);
ok(ret == 1, "sscanf returned %d for flags %#x\n", ret, tests[i]);
ok(ret_size == 1, "got wrong size_t %s for flags %#x\n",
wine_dbgstr_longlong((LONGLONG)ret_size), tests[i]);
}
}
......
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