[PATCH 2/4] ntdll: Support the %I format modifier.
Zebediah Figura
z.figura12 at gmail.com
Thu Jan 30 19:29:17 CST 2020
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/ntdll/printf.c | 6 ++++++
dlls/ntdll/tests/string.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/printf.c b/dlls/ntdll/printf.c
index f61441b36b4..d5b197396ad 100644
--- a/dlls/ntdll/printf.c
+++ b/dlls/ntdll/printf.c
@@ -561,6 +561,12 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
}
else if( *(p+1) == '3' && *(p+2) == '2' )
p += 3;
+ else if( p[1] && strchr( "diouxX", p[1] ) )
+ {
+ if( sizeof(void *) == 8 )
+ flags.IntegerDouble = *p;
+ p++;
+ }
else if( isDigit(*(p+1)) || *(p+1) == 0 )
break;
else
diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c
index d771b0f1932..b82235ae371 100644
--- a/dlls/ntdll/tests/string.c
+++ b/dlls/ntdll/tests/string.c
@@ -1362,7 +1362,7 @@ static void test__snprintf(void)
{
res = p__snprintf(buffer, sizeof(buffer), "%Ix %d", (ULONG_PTR)0x1234567890, 1);
ok(res == strlen(buffer), "wrong size %d\n", res);
- todo_wine ok(!strcmp(buffer, "1234567890 1"), "got %s\n", debugstr_a(buffer));
+ ok(!strcmp(buffer, "1234567890 1"), "got %s\n", debugstr_a(buffer));
}
else
{
--
2.25.0
More information about the wine-devel
mailing list