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
5d5f11c0
Commit
5d5f11c0
authored
Sep 20, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Support z length modifier in scanf.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6049cc86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
scanf.h
dlls/msvcrt/scanf.h
+5
-0
scanf.c
dlls/ucrtbase/tests/scanf.c
+7
-0
No files found.
dlls/msvcrt/scanf.h
View file @
5d5f11c0
...
...
@@ -281,6 +281,11 @@ _FUNCTION_ {
format
+=
2
;
}
break
;
#if _MSVCR_VER == 0 || _MSVCR_VER >= 140
case
'z'
:
if
(
sizeof
(
void
*
)
==
sizeof
(
LONGLONG
))
I64_prefix
=
1
;
break
;
#endif
default
:
prefix_finished
=
1
;
}
...
...
dlls/ucrtbase/tests/scanf.c
View file @
5d5f11c0
...
...
@@ -48,6 +48,7 @@ static void test_sscanf(void)
float
ret_float1
,
ret_float2
;
double
double_res
;
unsigned
int
i
;
size_t
ret_size
;
static
const
unsigned
int
tests
[]
=
{
...
...
@@ -289,6 +290,12 @@ static void test_sscanf(void)
ret
=
vsscanf_wrapper
(
tests
[
i
],
"infi"
,
-
1
,
"%lf%n"
,
&
double_res
,
&
count
);
ok
(
ret
==
-
1
,
"sscanf returned %d for flags %#x
\n
"
,
ret
,
tests
[
i
]);
ret_size
=
~
0
;
ret
=
vsscanf_wrapper
(
tests
[
i
],
"1"
,
-
1
,
"%zd"
,
&
ret_size
);
ok
(
ret
==
1
,
"sscanf returned %d for flags %#x
\n
"
,
ret
,
tests
[
i
]);
ok
(
ret_size
==
1
,
"got wrong size_t %s for flags %#x
\n
"
,
wine_dbgstr_longlong
((
LONGLONG
)
ret_size
),
tests
[
i
]);
}
}
...
...
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