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
ea6e5174
Commit
ea6e5174
authored
May 17, 2017
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid using isdigit() for WCHARs.
Found with Coccinelle. Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
553282a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
printf.c
dlls/ntdll/printf.c
+8
-3
No files found.
dlls/ntdll/printf.c
View file @
ea6e5174
...
@@ -410,6 +410,11 @@ static void pf_fixup_exponent( char *buf )
...
@@ -410,6 +410,11 @@ static void pf_fixup_exponent( char *buf )
}
}
}
}
static
inline
BOOL
isDigit
(
WCHAR
c
)
{
return
c
>=
'0'
&&
c
<=
'9'
;
}
/*********************************************************************
/*********************************************************************
* pf_vsnprintf (INTERNAL)
* pf_vsnprintf (INTERNAL)
*
*
...
@@ -490,7 +495,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
...
@@ -490,7 +495,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
}
}
p
++
;
p
++
;
}
}
else
while
(
is
d
igit
(
*
p
)
)
else
while
(
is
D
igit
(
*
p
)
)
{
{
flags
.
FieldLength
*=
10
;
flags
.
FieldLength
*=
10
;
flags
.
FieldLength
+=
*
p
++
-
'0'
;
flags
.
FieldLength
+=
*
p
++
-
'0'
;
...
@@ -507,7 +512,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
...
@@ -507,7 +512,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
flags
.
Precision
=
va_arg
(
valist
,
int
);
flags
.
Precision
=
va_arg
(
valist
,
int
);
p
++
;
p
++
;
}
}
else
while
(
is
d
igit
(
*
p
)
)
else
while
(
is
D
igit
(
*
p
)
)
{
{
flags
.
Precision
*=
10
;
flags
.
Precision
*=
10
;
flags
.
Precision
+=
*
p
++
-
'0'
;
flags
.
Precision
+=
*
p
++
-
'0'
;
...
@@ -531,7 +536,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
...
@@ -531,7 +536,7 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
}
}
else
if
(
*
(
p
+
1
)
==
'3'
&&
*
(
p
+
2
)
==
'2'
)
else
if
(
*
(
p
+
1
)
==
'3'
&&
*
(
p
+
2
)
==
'2'
)
p
+=
3
;
p
+=
3
;
else
if
(
is
d
igit
(
*
(
p
+
1
))
||
*
(
p
+
1
)
==
0
)
else
if
(
is
D
igit
(
*
(
p
+
1
))
||
*
(
p
+
1
)
==
0
)
break
;
break
;
else
else
p
++
;
p
++
;
...
...
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