mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[CRT]
Fix NTDLL implementation of mbstowcs() and wcstombs() so that they return length in caracters and not in bytes. This fixes last failing *to* CRT apitests CORE-10390 svn path=/trunk/; revision=69683
This commit is contained in:
parent
d9674b27cf
commit
6445100f0d
2 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count)
|
|||
mbstr,
|
||||
Length);
|
||||
|
||||
return (size_t)Size;
|
||||
return (size_t)(Size / sizeof(wchar_t));
|
||||
}
|
||||
|
||||
Status = RtlMultiByteToUnicodeN (wcstr,
|
||||
|
@ -60,7 +60,7 @@ size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count)
|
|||
if (!NT_SUCCESS(Status))
|
||||
return -1;
|
||||
|
||||
return (size_t)Size;
|
||||
return (size_t)(Size / sizeof(wchar_t));;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -40,7 +40,7 @@ size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count)
|
|||
(wchar_t*)((size_t)wcstr),
|
||||
Length * sizeof(WCHAR));
|
||||
|
||||
return (size_t)Size;
|
||||
return (size_t)(Size / sizeof(char));
|
||||
}
|
||||
|
||||
Status = RtlUnicodeToMultiByteN (mbstr,
|
||||
|
@ -51,7 +51,7 @@ size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count)
|
|||
if (!NT_SUCCESS(Status))
|
||||
return -1;
|
||||
|
||||
return (size_t)Size;
|
||||
return (size_t)(Size / sizeof(char));
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue