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@gmail.com --- dlls/kernel32/sync.c | 9 ++++++--- dlls/kernel32/tests/sync.c | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-)