Commit a6fb7be6 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ntdll: Ignore L length specifier in printf.

parent 85976669
......@@ -375,11 +375,15 @@ static int FUNC_NAME(pf_vsnprintf)( FUNC_NAME(pf_output) *out, const APICHAR *fo
flags.IntegerDouble = TRUE;
p += 2;
}
else if( *p == 'l' || *p == 'L' )
else if( *p == 'l' )
{
flags.IntegerLength = LEN_LONG;
p++;
}
else if( *p == 'L' )
{
p++;
}
else if( *p == 'h')
{
flags.IntegerLength = LEN_SHORT;
......
......@@ -1529,6 +1529,14 @@ static void test__snprintf(void)
ok(!memcmp(buffer, "tes", 3), "buf = %s\n", buffer);
ok(buffer[3] == 0x7c, "buffer[3] = %x\n", buffer[3]);
res = p_snprintf(buffer, sizeof(buffer), "%ls", L"test");
ok(res == strlen(buffer), "wrong size %d\n", res);
ok(!strcmp(buffer, "test"), "got %s\n", debugstr_a(buffer));
res = p_snprintf(buffer, sizeof(buffer), "%Ls", "test");
ok(res == strlen(buffer), "wrong size %d\n", res);
ok(!strcmp(buffer, "test"), "got %s\n", debugstr_a(buffer));
res = p_snprintf(buffer, sizeof(buffer), "%I64x %d", (ULONGLONG)0x1234567890, 1);
ok(res == strlen(buffer), "wrong size %d\n", res);
ok(!strcmp(buffer, "1234567890 1"), "got %s\n", debugstr_a(buffer));
......
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