mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 14:34:57 +08:00
[CRT] wctomb must return 0 if the destination pointer is NULL
This fixes 3 test failures.
This commit is contained in:
@@ -246,6 +246,9 @@ INT CDECL wctomb( char *dst, wchar_t ch )
|
||||
BOOL error;
|
||||
INT size;
|
||||
|
||||
if (!dst)
|
||||
return 0;
|
||||
|
||||
size = WideCharToMultiByte(get_locinfo()->lc_codepage, 0, &ch, 1, dst, dst ? 6 : 0, NULL, &error);
|
||||
if(!size || error) {
|
||||
*_errno() = EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user