Piotr Caban (@piotr) commented about dlls/msvcrt/mbcs.c:
/********************************************************************* - * _mbspbrk (MSVCRT.@) + * _mbspbrk_l (MSVCRT.@) */ -unsigned char* CDECL _mbspbrk(const unsigned char* str, const unsigned char* accept) +unsigned char* CDECL _mbspbrk_l(const unsigned char* str, const unsigned char* strCharSet, _locale_t locale) { const unsigned char* p; + pthreadmbcinfo mbcinfo;
- while(*str) + if (locale) + mbcinfo = locale->mbcinfo; + else + mbcinfo = get_mbcinfo(); + if (mbcinfo->ismbcodepage) I think it's better to avoid one level of indentation by changing the code in following way:
if (!mbcinfo->ismbcodepage)
return u_strpbrk(str, strCharSet);
I don't fill strongly about it so feel free to ignore this comment. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4341#note_51540