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
5c631168
Commit
5c631168
authored
Dec 19, 2005
by
Jesse Allen
Committed by
Alexandre Julliard
Dec 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Require exact uppercase and lowercase format in printf routines.
parent
d5739ed8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
printf.c
dlls/msvcrt/tests/printf.c
+5
-0
wcs.c
dlls/msvcrt/wcs.c
+2
-4
No files found.
dlls/msvcrt/tests/printf.c
View file @
5c631168
...
...
@@ -51,6 +51,11 @@ static void test_sprintf( void )
ok
(
!
strcmp
(
buffer
,
"1"
),
"Problem with
\"
ll
\"
interpretation
\n
"
);
ok
(
r
==
1
,
"return count wrong
\n
"
);
format
=
"%I"
;
r
=
sprintf
(
buffer
,
format
,
1
);
ok
(
!
strcmp
(
buffer
,
"I"
),
"Problem with
\"
I
\"
interpretation
\n
"
);
ok
(
r
==
1
,
"return count wrong
\n
"
);
format
=
"%S"
;
r
=
sprintf
(
buffer
,
format
,
wide
);
ok
(
!
strcmp
(
buffer
,
"wide"
),
"Problem with wide string format
\n
"
);
...
...
dlls/msvcrt/wcs.c
View file @
5c631168
...
...
@@ -347,19 +347,17 @@ static inline int pf_output_format_A( pf_output *out, LPCSTR str,
static
inline
BOOL
pf_is_double_format
(
char
fmt
)
{
char
float_fmts
[]
=
"aefg
"
;
static
const
char
float_fmts
[]
=
"aeEfgG
"
;
if
(
!
fmt
)
return
FALSE
;
fmt
=
tolower
(
fmt
);
return
strchr
(
float_fmts
,
fmt
)
?
TRUE
:
FALSE
;
}
static
inline
BOOL
pf_is_valid_format
(
char
fmt
)
{
char
float_fmts
[]
=
"acdefginoux
"
;
static
const
char
float_fmts
[]
=
"acCdeEfgGinouxX
"
;
if
(
!
fmt
)
return
FALSE
;
fmt
=
tolower
(
fmt
);
return
strchr
(
float_fmts
,
fmt
)
?
TRUE
:
FALSE
;
}
...
...
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