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
0dc0d446
Commit
0dc0d446
authored
Jun 03, 2000
by
Juergen Schmied
Committed by
Alexandre Julliard
Jun 03, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crash.
parent
36b5b6b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
wsprintf.c
misc/wsprintf.c
+6
-6
No files found.
misc/wsprintf.c
View file @
0dc0d446
...
...
@@ -436,7 +436,6 @@ INT WINAPI wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec,
for
(
i
=
len
;
i
<
format
.
precision
;
i
++
,
maxlen
--
)
*
p
++
=
'0'
;
memcpy
(
p
,
number
,
len
);
p
+=
len
;
/* Go to the next arg */
break
;
case
WPR_UNKNOWN
:
continue
;
...
...
@@ -464,6 +463,8 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec,
CHAR
number
[
20
];
WPRINTF_DATA
argData
;
TRACE
(
"%p %u %s
\n
"
,
buffer
,
maxlen
,
debugstr_w
(
spec
));
while
(
*
spec
&&
(
maxlen
>
1
))
{
if
(
*
spec
!=
'%'
)
{
*
p
++
=
*
spec
++
;
maxlen
--
;
continue
;
}
...
...
@@ -478,25 +479,25 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec,
switch
(
format
.
type
)
{
case
WPR_WCHAR
:
*
p
=
va_arg
(
args
,
WCHAR
)
;
*
p
=
argData
.
wchar_view
;
if
(
*
p
!=
'\0'
)
p
++
;
else
if
(
format
.
width
>
1
)
*
p
++
=
' '
;
else
len
=
0
;
break
;
case
WPR_CHAR
:
*
p
=
(
WCHAR
)
va_arg
(
args
,
CHAR
)
;
*
p
=
argData
.
char_view
;
if
(
*
p
!=
'\0'
)
p
++
;
else
if
(
format
.
width
>
1
)
*
p
++
=
' '
;
else
len
=
0
;
break
;
case
WPR_STRING
:
{
LPCSTR
ptr
=
va_arg
(
args
,
LPCSTR
)
;
LPCSTR
ptr
=
argData
.
lpcstr_view
;
for
(
i
=
0
;
i
<
len
;
i
++
)
*
p
++
=
(
WCHAR
)
*
ptr
++
;
}
break
;
case
WPR_WSTRING
:
if
(
len
)
memcpy
(
p
,
va_arg
(
args
,
LPCWSTR
)
,
len
*
sizeof
(
WCHAR
)
);
if
(
len
)
memcpy
(
p
,
argData
.
lpcwstr_view
,
len
*
sizeof
(
WCHAR
)
);
p
+=
len
;
break
;
case
WPR_HEXA
:
...
...
@@ -512,7 +513,6 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec,
case
WPR_UNSIGNED
:
for
(
i
=
len
;
i
<
format
.
precision
;
i
++
,
maxlen
--
)
*
p
++
=
'0'
;
for
(
i
=
0
;
i
<
len
;
i
++
)
*
p
++
=
(
WCHAR
)
number
[
i
];
(
void
)
va_arg
(
args
,
INT
);
/* Go to the next arg */
break
;
case
WPR_UNKNOWN
:
continue
;
...
...
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