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
39b725b7
Commit
39b725b7
authored
Dec 20, 2005
by
Jesse Allen
Committed by
Alexandre Julliard
Dec 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Ignore PadZero when LeftAlign is true in printf conversions.
parent
9a95aa7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
printf.c
dlls/msvcrt/tests/printf.c
+5
-0
wcs.c
dlls/msvcrt/wcs.c
+2
-3
No files found.
dlls/msvcrt/tests/printf.c
View file @
39b725b7
...
...
@@ -66,6 +66,11 @@ static void test_sprintf( void )
ok
(
!
strcmp
(
buffer
,
"0001"
),
"Character not zero-prefixed
\"
%s
\"\n
"
,
buffer
);
ok
(
r
==
4
,
"return count wrong
\n
"
);
format
=
"%-04c"
;
r
=
sprintf
(
buffer
,
format
,
'1'
);
ok
(
!
strcmp
(
buffer
,
"1 "
),
"Character zero-padded and/or not left-adjusted
\"
%s
\"\n
"
,
buffer
);
ok
(
r
==
4
,
"return count wrong
\n
"
);
format
=
"%p"
;
r
=
sprintf
(
buffer
,
format
,(
void
*
)
57
);
ok
(
!
strcmp
(
buffer
,
"00000039"
),
"Pointer formatted incorrectly
\"
%s
\"\n
"
,
buffer
);
...
...
dlls/msvcrt/wcs.c
View file @
39b725b7
...
...
@@ -286,12 +286,11 @@ static inline int pf_fill( pf_output *out, int len, pf_flags *flags, char left )
int
i
,
r
=
0
;
if
(
(
!
left
&&
flags
->
LeftAlign
)
||
(
left
&&
!
flags
->
LeftAlign
)
||
(
left
&&
flags
->
PadZero
)
)
(
left
&&
!
flags
->
LeftAlign
))
{
for
(
i
=
0
;
(
i
<
(
flags
->
FieldLength
-
len
))
&&
(
r
>=
0
);
i
++
)
{
if
(
flags
->
PadZero
)
if
(
left
&&
flags
->
PadZero
)
r
=
pf_output_stringA
(
out
,
"0"
,
1
);
else
r
=
pf_output_stringA
(
out
,
" "
,
1
);
...
...
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