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
bbe9c51b
Commit
bbe9c51b
authored
Jan 29, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix *printf() handling of negative field width.
parent
fdff5c3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
printf.c
dlls/msvcrt/tests/printf.c
+5
-0
wcs.c
dlls/msvcrt/wcs.c
+6
-1
No files found.
dlls/msvcrt/tests/printf.c
View file @
bbe9c51b
...
...
@@ -279,6 +279,11 @@ static void test_sprintf( void )
ok
(
!
strcmp
(
buffer
,
"f"
),
"Precision ignored
\"
%s
\"\n
"
,
buffer
);
ok
(
r
==
1
,
"return count wrong
\n
"
);
format
=
"%*s"
;
r
=
sprintf
(
buffer
,
format
,
-
5
,
"foo"
);
ok
(
!
strcmp
(
buffer
,
"foo "
),
"Negative field width ignored
\"
%s
\"\n
"
,
buffer
);
ok
(
r
==
5
,
"return count wrong
\n
"
);
format
=
"%#-012p"
;
r
=
sprintf
(
buffer
,
format
,(
void
*
)
57
);
ok
(
!
strcmp
(
buffer
,
"0X00000039 "
),
"Pointer formatted incorrectly
\n
"
);
...
...
dlls/msvcrt/wcs.c
View file @
bbe9c51b
...
...
@@ -568,9 +568,14 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
/* deal with the field width specifier */
flags
.
FieldLength
=
0
;
if
(
*
p
==
'*'
)
if
(
*
p
==
'*'
)
{
flags
.
FieldLength
=
va_arg
(
valist
,
int
);
if
(
flags
.
FieldLength
<
0
)
{
flags
.
LeftAlign
=
'-'
;
flags
.
FieldLength
=
-
flags
.
FieldLength
;
}
p
++
;
}
else
while
(
isdigit
(
*
p
)
)
...
...
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