msvcrt: Improve printf %I format support.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
007f1b9a82
commit
1309e11ea1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue