From b4f20eec463d5bffe543305eeab4875074080e04 Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Wed, 8 Jun 2022 21:38:02 +0900 Subject: [PATCH] msvcrt: Avoid passing an invalid LCID to LCMapStringW. Because it complains as follows on startup in Japanese locale: 002c:err:msvcrt:create_mbcinfo WideCharToMultiByte failed for cp 932, ret=0 (exp 196), error=122 This happens after commit c2a455a20d7b5124bab0086df75178d8c53f27ef. Signed-off-by: Akihiro Sagawa Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcrt/mbcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index fa25a7092e3..dc9abca1b44 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -333,8 +333,8 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo) } GetStringTypeW(CT_CTYPE1, bufW, charcount, chartypes); - LCMapStringW(lcid, LCMAP_LOWERCASE, bufW, charcount, lowW, charcount); - LCMapStringW(lcid, LCMAP_UPPERCASE, bufW, charcount, upW, charcount); + LCMapStringW(mbcinfo->mblcid, LCMAP_LOWERCASE, bufW, charcount, lowW, charcount); + LCMapStringW(mbcinfo->mblcid, LCMAP_UPPERCASE, bufW, charcount, upW, charcount); charcount = 0; for (i = 0; i < maxchar; i++) -- 2.11.4.GIT