18 May
2025
18 May
'25
1:31 p.m.
Piotr Caban (@piotr) commented about dlls/ucrtbase/tests/printf.c:
const int n = vswprintf_wrapper (_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, buffer, bufsiz, fmt); const int valid = n < 0 ? bufsiz : (n == bufsiz ? n : n+1);
WideCharToMultiByte (CP_ACP, 0, buffer, -1, narrow, sizeof(narrow), NULL, NULL);
It makes more sense to fix WideCharToMultiByte call instead (it needs to be done in all the loops): ```suggestion:-0+0 WideCharToMultiByte (CP_ACP, 0, buffer, valid, narrow, sizeof(narrow), NULL, NULL); ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8071#note_103756