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
5d907050
Commit
5d907050
authored
Sep 23, 2016
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Sep 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Short circuit required length calculation.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a901b68f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
locale.c
dlls/kernel32/locale.c
+14
-9
No files found.
dlls/kernel32/locale.c
View file @
5d907050
...
@@ -3207,17 +3207,22 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW
...
@@ -3207,17 +3207,22 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW
{
{
INT
len
;
INT
len
;
for
(
len
=
0
;
srclen
;
src
++
,
srclen
--
)
if
(
flags
&
NORM_IGNORESYMBOLS
)
{
{
WCHAR
wch
=
*
src
;
for
(
len
=
0
;
srclen
;
src
++
,
srclen
--
)
/* tests show that win2k just ignores NORM_IGNORENONSPACE,
{
* and skips white space and punctuation characters for
WCHAR
wch
=
*
src
;
* NORM_IGNORESYMBOLS.
/* tests show that win2k just ignores NORM_IGNORENONSPACE,
*/
* and skips white space and punctuation characters for
if
((
flags
&
NORM_IGNORESYMBOLS
)
&&
(
get_char_typeW
(
wch
)
&
(
C1_PUNCT
|
C1_SPACE
)))
* NORM_IGNORESYMBOLS.
continue
;
*/
len
++
;
if
(
get_char_typeW
(
wch
)
&
(
C1_PUNCT
|
C1_SPACE
))
continue
;
len
++
;
}
}
}
else
len
=
srclen
;
return
len
;
return
len
;
}
}
...
...
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