[PATCH v4 1/2] msvcrt: Don't set error in wcstombs_s_l if no characters to convert.
Piotr Caban
piotr.caban at gmail.com
Wed Feb 5 09:32:55 CST 2020
On 2/5/20 3:39 PM, Daniel Lehman wrote:
if(!mbstr) {
tmp = WideCharToMultiByte(locinfo->lc_codepage,
WC_NO_BEST_FIT_CHARS,
- *wcstr, -1, NULL, 0, NULL, &used_default)-1;
- if(!tmp || used_default) {
+ *wcstr, -1, NULL, 0, NULL, &used_default);
+ if(used_default) {
*MSVCRT__errno() = MSVCRT_EILSEQ;
return -1;
}
I think we should still set errno when WideCharToMultiByte fails (the
!tmp case).
Thanks,
Piotr
More information about the wine-devel
mailing list