Akihiro Sagawa : msvcrt: Fix mbtowc_l in C locale.
Module: wine Branch: master Commit: 23b8c4df1910832dd409f6c8cc8906ac64be4279 URL: http://source.winehq.org/git/wine.git/?a=commit;h=23b8c4df1910832dd409f6c8cc... Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Mar 27 23:16:44 2013 +0900 msvcrt: Fix mbtowc_l in C locale. --- dlls/msvcrt/mbcs.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 121edbb..fdc5422 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2016,7 +2016,9 @@ int CDECL MSVCRT_mbtowc_l(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n, if(n <= 0 || !str) return 0; - if(!MultiByteToWideChar(locinfo->lc_codepage, 0, str, n, &tmpdst, 1)) + if(!locinfo->lc_codepage) + tmpdst = (unsigned char)*str; + else if(!MultiByteToWideChar(locinfo->lc_codepage, 0, str, n, &tmpdst, 1)) return -1; if(dst) *dst = tmpdst;
participants (1)
-
Alexandre Julliard