Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a6fb7be6
Commit
a6fb7be6
authored
Jul 14, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Ignore L length specifier in printf.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
85976669
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
printf.h
dlls/ntdll/printf.h
+5
-1
string.c
dlls/ntdll/tests/string.c
+8
-0
No files found.
dlls/ntdll/printf.h
View file @
a6fb7be6
...
...
@@ -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
;
...
...
dlls/ntdll/tests/string.c
View file @
a6fb7be6
...
...
@@ -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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment