Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
62a1410a
Commit
62a1410a
authored
Jan 05, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix source/destination confusion in vsscanf.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0bdd879f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
string.c
dlls/ntdll/string.c
+12
-12
No files found.
dlls/ntdll/string.c
View file @
62a1410a
...
...
@@ -1178,19 +1178,19 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
else
goto
widecharacter
;
character:
{
/* read single character into char */
char
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
pstr
=
s
tr
;
char
*
s
p
tr
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
sptr_beg
=
sp
tr
;
unsigned
size
=
UINT_MAX
;
if
(
width
==
-
1
)
width
=
1
;
while
(
width
&&
nch
!=
'\0'
)
{
if
(
!
suppress
)
{
*
str
++
=
nch
;
*
s
p
tr
++
=
nch
;
if
(
size
)
size
--
;
else
{
*
pstr
=
0
;
*
sptr_beg
=
0
;
return
rd
;
}
}
...
...
@@ -1202,19 +1202,19 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
break
;
widecharacter:
{
/* read single character into a WCHAR */
WCHAR
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
WCHAR
*
);
WCHAR
*
pstr
=
s
tr
;
WCHAR
*
s
p
tr
=
suppress
?
NULL
:
va_arg
(
ap
,
WCHAR
*
);
WCHAR
*
sptr_beg
=
sp
tr
;
unsigned
size
=
UINT_MAX
;
if
(
width
==
-
1
)
width
=
1
;
while
(
width
&&
nch
!=
'\0'
)
{
if
(
!
suppress
)
{
*
str
++
=
nch
;
*
s
p
tr
++
=
nch
;
if
(
size
)
size
--
;
else
{
*
pstr
=
0
;
*
sptr_beg
=
0
;
return
rd
;
}
}
...
...
@@ -1248,10 +1248,10 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
break
;
case
'['
:
{
char
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
sptr
=
s
tr
;
char
*
s
p
tr
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
sptr
_beg
=
sp
tr
;
RTL_BITMAP
bitMask
;
ULONG
Mask
[
8
];
ULONG
Mask
[
8
]
=
{
0
}
;
BOOLEAN
invert
=
FALSE
;
/* Set if we are NOT to find the chars */
unsigned
size
=
UINT_MAX
;
...
...
@@ -1312,7 +1312,7 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
if
(
size
>
1
)
size
--
;
else
{
*
str
=
0
;
if
(
!
suppress
)
*
sptr_beg
=
0
;
return
rd
;
}
}
...
...
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