Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr>
---
Removed comments, added a cast.
---
dlls/msvcrt/tests/scanf.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c
index 57d9cc0..60e1f6c 100644
--- a/dlls/msvcrt/tests/scanf.c
+++ b/dlls/msvcrt/tests/scanf.c
@@ -207,9 +207,14 @@ static void test_sscanf( void )
result = 0xdeadbeef;
strcpy(buffer,"12345678");
- ret = p_sscanf(buffer, "%hd", &result);
+ ret = p_sscanf(buffer, "%d", &result);
ok(ret == 1, "Wrong number of arguments read: %d\n", ret);
- ok(result == 0xdead614e, "Wrong number read (%x)\n", result);
+ ok(result == 0x00bc614e, "Wrong number read (%08x)\n", result);
+
+ result = 0xdeadbeef;
+ ret = p_sscanf(buffer, "%hd", (short *)&result);
+ ok(ret == 1, "Wrong number of arguments read: %d\n", ret);
+ ok(result == 0xdead614e, "Wrong number read (%08x)\n", result);
result = 0xdeadbeef;
strcpy(buffer,"12345678");
@@ -238,7 +243,7 @@ static void test_sscanf( void )
result = 0xdeadbeef;
ret = p_sscanf(buffer, "%hhd", &result);
ok(ret == 1, "Wrong number of arguments read: %d\n", ret);
- ok(result == 0xbc614e, "Wrong number read (%x)\n", result);
+ ok(result == 0x00bc614e, "Wrong number read (%08x)\n", result);
strcpy(buffer,"12345678901234");
ret = p_sscanf(buffer, "%lld", &result64);
--
2.10.0.windows.1