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
09a32152
Commit
09a32152
authored
Apr 19, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add parameters to mimic *_s function behaviour in pf_vsnprintf.
parent
419f9025
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
wcs.c
dlls/msvcrt/wcs.c
+15
-3
No files found.
dlls/msvcrt/wcs.c
View file @
09a32152
...
...
@@ -554,7 +554,8 @@ static void pf_fixup_exponent( char *buf )
*
* implements both A and W vsnprintf functions
*/
static
int
pf_vsnprintf
(
pf_output
*
out
,
const
WCHAR
*
format
,
MSVCRT__locale_t
locale
,
__ms_va_list
valist
)
static
int
pf_vsnprintf
(
pf_output
*
out
,
const
WCHAR
*
format
,
MSVCRT__locale_t
locale
,
BOOL
valid
,
__ms_va_list
valist
)
{
int
r
;
LPCWSTR
q
,
p
=
format
;
...
...
@@ -785,9 +786,20 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, MSVCRT__locale_t l
r
=
pf_output_stringA
(
out
,
x
,
-
1
);
if
(
x
!=
number
)
HeapFree
(
GetProcessHeap
(),
0
,
x
);
if
(
r
<
0
)
return
r
;
}
else
{
if
(
valid
)
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
-
1
;
}
continue
;
}
if
(
r
<
0
)
return
r
;
...
...
@@ -821,7 +833,7 @@ int CDECL MSVCRT_vsnprintf( char *str, unsigned int len,
formatW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sz
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
format
,
-
1
,
formatW
,
sz
);
r
=
pf_vsnprintf
(
&
out
,
formatW
,
NULL
,
valist
);
r
=
pf_vsnprintf
(
&
out
,
formatW
,
NULL
,
FALSE
,
valist
);
HeapFree
(
GetProcessHeap
(),
0
,
formatW
);
...
...
@@ -878,7 +890,7 @@ int CDECL MSVCRT_vsnwprintf( MSVCRT_wchar_t *str, unsigned int len,
out
.
used
=
0
;
out
.
len
=
len
;
return
pf_vsnprintf
(
&
out
,
format
,
NULL
,
valist
);
return
pf_vsnprintf
(
&
out
,
format
,
NULL
,
FALSE
,
valist
);
}
/*********************************************************************
...
...
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