msvcrt: Fix C locale handling in mbstowcs.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7efd0c2c79
commit
f091d9edf6
|
@ -2253,6 +2253,17 @@ MSVCRT_size_t CDECL MSVCRT__mbstowcs_l(MSVCRT_wchar_t *wcstr, const char *mbstr,
|
|||
else
|
||||
locinfo = locale->locinfo;
|
||||
|
||||
if(!locinfo->lc_codepage) {
|
||||
if(!wcstr)
|
||||
return strlen(mbstr);
|
||||
|
||||
for(i=0; i<count; i++) {
|
||||
wcstr[i] = (unsigned char)mbstr[i];
|
||||
if(!wcstr[i]) break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/* Ignore count parameter */
|
||||
if(!wcstr)
|
||||
return MultiByteToWideChar(locinfo->lc_codepage, 0, mbstr, -1, NULL, 0)-1;
|
||||
|
|
Loading…
Reference in New Issue