10 Oct
2024
10 Oct
'24
1:09 p.m.
Piotr Caban (@piotr) commented about dlls/msvcrt/thread.c:
#if _MSVCR_VER >= 140 ptr->module = NULL; #endif + _setmbcp(_MB_CP_ANSI); You can't call _setmbcp() here - it might modify other thread mbcp when global (non per-thread) settings are used. The bug is caused by using uninitialized locale cache. The simplest solution is to set:
ptr->cached_locale[0] = 'C';
ptr->cached_locale[1] = 0;
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6644#note_84575