[PATCH 2/2] kernel32: Use RtlAnsiStringToUnicodeString() in OpenMutexA.
sagawa.aki at gmail.com
Wed May 13 09:12:38 CDT 2020
This commit makes consistent with the commit 2db497e89e8e4a37a8bd569b8691b9b87ae63606,
which introduces RtlAnsiStringToUnicodeString() into CreateMutexA().
In multi-byte locale, suppose there is an odd ANSI string which ends with
leading-byte. MultiByteToWideChar() translates the last leading-byte to the
default character in Unicode nowadays (Vista+). However,
RtlAnsiStringToUnicodeString() remains old behavior which drops the last
leading-byte character when converting it to Unicode.
This difference confuses a certain application which uses binary string, i.e.
ill-formed multi-byte string, as a mutex name in Japanese locale.
Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
dlls/kernel32/sync.c | 9 ++++++---
dlls/kernel32/tests/sync.c | 8 ++++----
2 files changed, 10 insertions(+), 7 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1938 bytes
Desc: not available
More information about the wine-devel