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
5ddca3dc
Commit
5ddca3dc
authored
Feb 19, 2020
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Feb 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix wnsprintfA/wvnsprintfA %C conversion.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7cc21d03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
wsprintf.c
dlls/shlwapi/wsprintf.c
+12
-2
No files found.
dlls/shlwapi/wsprintf.c
View file @
5ddca3dc
...
@@ -254,8 +254,11 @@ static UINT WPRINTF_GetLen( WPRINTF_FORMAT *format, WPRINTF_DATA *arg,
...
@@ -254,8 +254,11 @@ static UINT WPRINTF_GetLen( WPRINTF_FORMAT *format, WPRINTF_DATA *arg,
switch
(
format
->
type
)
switch
(
format
->
type
)
{
{
case
WPR_CHAR
:
case
WPR_CHAR
:
case
WPR_WCHAR
:
return
(
format
->
precision
=
1
);
return
(
format
->
precision
=
1
);
case
WPR_WCHAR
:
if
(
dst_is_wide
)
len
=
1
;
else
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
&
arg
->
wchar_view
,
1
,
NULL
,
0
,
NULL
,
NULL
);
return
(
format
->
precision
=
len
);
case
WPR_STRING
:
case
WPR_STRING
:
if
(
!
arg
->
lpcstr_view
)
arg
->
lpcstr_view
=
null_stringA
;
if
(
!
arg
->
lpcstr_view
)
arg
->
lpcstr_view
=
null_stringA
;
if
(
dst_is_wide
)
if
(
dst_is_wide
)
...
@@ -397,7 +400,14 @@ INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, __ms_va_list args
...
@@ -397,7 +400,14 @@ INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, __ms_va_list args
switch
(
format
.
type
)
switch
(
format
.
type
)
{
{
case
WPR_WCHAR
:
case
WPR_WCHAR
:
*
p
++
=
argData
.
wchar_view
;
{
CHAR
mb
[
5
];
if
(
WideCharToMultiByte
(
CP_ACP
,
0
,
&
argData
.
wchar_view
,
1
,
mb
,
sizeof
(
mb
),
NULL
,
NULL
))
{
memcpy
(
p
,
mb
,
len
);
p
+=
len
;
}
}
break
;
break
;
case
WPR_CHAR
:
case
WPR_CHAR
:
*
p
++
=
argData
.
char_view
;
*
p
++
=
argData
.
char_view
;
...
...
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