Commit 1309e11e authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Improve printf %I format support.

parent 007f1b9a
......@@ -509,10 +509,10 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API
p += 3;
} else if(*(p+1)=='3' && *(p+2)=='2')
p += 3;
else if(isdigit(*(p+1)) || !*(p+1))
break;
else
else if(p[1] && strchr("diouxX", p[1]))
flags.IntegerNative = *p++;
else
break;
} else if(*p == 'w')
flags.WideString = *p++;
#if _MSVCR_VER >= 140
......
......@@ -159,6 +159,8 @@ static void test_sprintf( void )
" 00000000000000000000000000000000000000000000000000000000000000000000000000000001",
0, INT_ARG, 1 },
{ "%I", "I", 0, INT_ARG, 1 },
{ "%Iq", "Iq", 0, INT_ARG, 1 },
{ "%Ihd", "Ihd", 0, INT_ARG, 1 },
{ "%I0d", "I0d", 0, INT_ARG, 1 },
{ "%I64D", "D", 0, ULONGLONG_ARG, 0, -1 },
{ "%zx", "1", "zx", TODO_FLAG | INT_ARG, 1 },
......@@ -256,6 +258,7 @@ static void test_sprintf( void )
int i, x, r;
for (i=0; i<ARRAY_SIZE(tests); i++) {
memset(buffer, 'x', sizeof(buffer));
switch(tests[i].type & 0xff) {
case NO_ARG:
r = p_sprintf(buffer, tests[i].format);
......
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