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
4249a91b
Commit
4249a91b
authored
Dec 11, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Dec 11, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not confuse the 0 fill magic of wsprintf with the "0x" hex prefix.
parent
0497aa64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
wsprintf.c
misc/wsprintf.c
+3
-9
No files found.
misc/wsprintf.c
View file @
4249a91b
...
...
@@ -237,9 +237,8 @@ static UINT WPRINTF_GetLen( WPRINTF_FORMAT *format, WPRINTF_DATA *arg,
break
;
case
WPR_HEXA
:
len
=
sprintf
(
number
,
(
format
->
flags
&
WPRINTF_UPPER_HEX
)
?
"%X"
:
"%x"
,
(
UINT
)
arg
->
int_view
);
if
(
format
->
flags
&
WPRINTF_PREFIX_HEX
)
len
+=
2
;
(
format
->
flags
&
WPRINTF_UPPER_HEX
)
?
"%X"
:
"%x"
,
(
UINT
)
arg
->
int_view
);
break
;
default:
return
0
;
...
...
@@ -249,6 +248,7 @@ static UINT WPRINTF_GetLen( WPRINTF_FORMAT *format, WPRINTF_DATA *arg,
if
(
format
->
precision
>
maxlen
)
format
->
precision
=
maxlen
;
if
((
format
->
flags
&
WPRINTF_ZEROPAD
)
&&
(
format
->
width
>
format
->
precision
))
format
->
precision
=
format
->
width
;
if
(
format
->
flags
&
WPRINTF_PREFIX_HEX
)
len
+=
2
;
return
len
;
}
...
...
@@ -351,8 +351,6 @@ INT16 WINAPI wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec,
*
p
++
=
(
format
.
flags
&
WPRINTF_UPPER_HEX
)
?
'X'
:
'x'
;
maxlen
-=
2
;
len
-=
2
;
format
.
precision
-=
2
;
format
.
width
-=
2
;
}
/* fall through */
case
WPR_SIGNED
:
...
...
@@ -428,8 +426,6 @@ INT WINAPI wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec,
*
p
++
=
(
format
.
flags
&
WPRINTF_UPPER_HEX
)
?
'X'
:
'x'
;
maxlen
-=
2
;
len
-=
2
;
format
.
precision
-=
2
;
format
.
width
-=
2
;
}
/* fall through */
case
WPR_SIGNED
:
...
...
@@ -505,8 +501,6 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec,
*
p
++
=
(
format
.
flags
&
WPRINTF_UPPER_HEX
)
?
'X'
:
'x'
;
maxlen
-=
2
;
len
-=
2
;
format
.
precision
-=
2
;
format
.
width
-=
2
;
}
/* fall through */
case
WPR_SIGNED
:
...
...
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