Commit 9445bed2 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ucrtbase: Write the %hh prefix as a single char.

This fixes a crash in Planet Coaster on startup. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 353ea070
......@@ -309,6 +309,9 @@ _FUNCTION_ {
if (I64_prefix) _SET_NUMBER_(LONGLONG);
else if (l_prefix) _SET_NUMBER_(LONG);
else if (h_prefix == 1) _SET_NUMBER_(short int);
#if _MSVCR_VER >= 140
else if (h_prefix == 2) _SET_NUMBER_(char);
#endif
else _SET_NUMBER_(int);
}
}
......
......@@ -188,7 +188,7 @@ static void test_sscanf(void)
result = 0xdeadbeef;
ret = vsscanf_wrapper(tests[i], "12345678", "%hhd", &result);
ok(ret == 1, "sscanf returned %d for flags %#x\n", ret, tests[i]);
todo_wine ok(result == 0xdeadbe4e, "got wrong number %#x for flags %#x\n", result, tests[i]);
ok(result == 0xdeadbe4e, "got wrong number %#x for flags %#x\n", result, tests[i]);
ret = vsscanf_wrapper(tests[i], "12345678901234", "%lld", &result64);
ok(ret == 1, "sscanf returned %d for flags %#x\n", ret, 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