Handle %ls in sprintf.
This commit is contained in:
parent
bf6d5fc66b
commit
5def7dd337
|
@ -131,6 +131,16 @@ static void test_sprintf( void )
|
|||
ok(!strcmp(buffer,"-s"), "failed\n");
|
||||
ok( r==2, "return count wrong\n");
|
||||
|
||||
format = "%ls";
|
||||
r = sprintf(buffer, format, wide );
|
||||
ok(!strcmp(buffer,"wide"), "failed\n");
|
||||
ok( r==4, "return count wrong\n");
|
||||
|
||||
format = "%Ls";
|
||||
r = sprintf(buffer, format, "not wide" );
|
||||
ok(!strcmp(buffer,"not wide"), "failed\n");
|
||||
ok( r==8, "return count wrong\n");
|
||||
|
||||
format = "%b";
|
||||
r = sprintf(buffer, format);
|
||||
ok(!strcmp(buffer,"b"), "failed\n");
|
||||
|
|
|
@ -501,7 +501,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
|
|||
r = 0;
|
||||
|
||||
/* output a unicode string */
|
||||
if( ( flags.Format == 's' && flags.WideString ) ||
|
||||
if( ( flags.Format == 's' && (flags.WideString || flags.IntegerLength == 'l' )) ||
|
||||
( !out->unicode && flags.Format == 'S' ) ||
|
||||
( out->unicode && flags.Format == 's' ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue