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
2dced178
Commit
2dced178
authored
May 24, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Don't ignore the specified locale in LCMapStringA/W.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
80eef003
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
locale.c
dlls/kernelbase/locale.c
+32
-4
No files found.
dlls/kernelbase/locale.c
View file @
2dced178
...
...
@@ -5945,7 +5945,7 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringA( LCID lcid, DWORD flags, const char *s
SetLastError
(
ERROR_INVALID_FLAGS
);
goto
done
;
}
ret
=
LCMapString
Ex
(
NULL
,
flags
,
srcW
,
srclenW
,
(
WCHAR
*
)
dst
,
dstlen
,
NULL
,
NULL
,
0
);
ret
=
LCMapString
W
(
lcid
,
flags
,
srcW
,
srclenW
,
(
WCHAR
*
)
dst
,
dstlen
);
goto
done
;
}
...
...
@@ -5955,7 +5955,7 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringA( LCID lcid, DWORD flags, const char *s
goto
done
;
}
dstlenW
=
LCMapString
Ex
(
NULL
,
flags
,
srcW
,
srclenW
,
NULL
,
0
,
NULL
,
NULL
,
0
);
dstlenW
=
LCMapString
W
(
lcid
,
flags
,
srcW
,
srclenW
,
NULL
,
0
);
if
(
!
dstlenW
)
goto
done
;
dstW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dstlenW
*
sizeof
(
WCHAR
)
);
...
...
@@ -5964,7 +5964,7 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringA( LCID lcid, DWORD flags, const char *s
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
goto
done
;
}
LCMapString
Ex
(
NULL
,
flags
,
srcW
,
srclenW
,
dstW
,
dstlenW
,
NULL
,
NULL
,
0
);
LCMapString
W
(
lcid
,
flags
,
srcW
,
srclenW
,
dstW
,
dstlenW
);
ret
=
WideCharToMultiByte
(
locale_cp
,
0
,
dstW
,
dstlenW
,
dst
,
dstlen
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
dstW
);
...
...
@@ -5980,7 +5980,35 @@ done:
INT
WINAPI
DECLSPEC_HOTPATCH
LCMapStringW
(
LCID
lcid
,
DWORD
flags
,
const
WCHAR
*
src
,
int
srclen
,
WCHAR
*
dst
,
int
dstlen
)
{
return
LCMapStringEx
(
NULL
,
flags
,
src
,
srclen
,
dst
,
dstlen
,
NULL
,
NULL
,
0
);
const
WCHAR
*
locale
=
LOCALE_NAME_USER_DEFAULT
;
if
(
flags
&
(
LCMAP_LINGUISTIC_CASING
|
LCMAP_SORTKEY
))
{
const
NLS_LOCALE_LCID_INDEX
*
entry
;
switch
(
lcid
)
{
case
LOCALE_NEUTRAL
:
case
LOCALE_USER_DEFAULT
:
case
LOCALE_SYSTEM_DEFAULT
:
case
LOCALE_CUSTOM_DEFAULT
:
case
LOCALE_CUSTOM_UNSPECIFIED
:
case
LOCALE_CUSTOM_UI_DEFAULT
:
break
;
default
:
if
(
lcid
==
user_lcid
||
lcid
==
system_lcid
)
break
;
if
(
!
(
entry
=
find_lcid_entry
(
lcid
)))
{
WARN
(
"unknown locale %04lx
\n
"
,
lcid
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
locale
=
locale_strings
+
entry
->
name
+
1
;
break
;
}
}
return
LCMapStringEx
(
locale
,
flags
,
src
,
srclen
,
dst
,
dstlen
,
NULL
,
NULL
,
0
);
}
...
...
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