Commit 8bf17329 authored by Orion Poplawski's avatar Orion Poplawski Committed by Alexandre Julliard

msvcrt: Bump MSVCRT_MB_LEN_MAX to 5 and use it in MSVCRT__wctomb_l for default…

msvcrt: Bump MSVCRT_MB_LEN_MAX to 5 and use it in MSVCRT__wctomb_l for default buffer lengthSet MB_LEN_MAX to 5 to match MSVCRT_MB_LEN_MAX.
parent f0fc2ba2
......@@ -47,7 +47,7 @@
#define MSVCRT_I64_MAX (((__int64)0x7fffffff << 32) | 0xffffffff)
#define MSVCRT_I64_MIN (-MSVCRT_I64_MAX-1)
#define MSVCRT_UI64_MAX (((unsigned __int64)0xffffffff << 32) | 0xffffffff)
#define MSVCRT_MB_LEN_MAX 2
#define MSVCRT_MB_LEN_MAX 5
#ifdef _WIN64
#define MSVCRT_SIZE_MAX MSVCRT_UI64_MAX
#else
......
......@@ -1474,7 +1474,7 @@ int CDECL MSVCRT__wctomb_l(char *dst, MSVCRT_wchar_t ch, MSVCRT__locale_t locale
{
int len;
MSVCRT__wctomb_s_l(&len, dst, dst ? 6 : 0, ch, locale);
MSVCRT__wctomb_s_l(&len, dst, dst ? MSVCRT_MB_LEN_MAX : 0, ch, locale);
return len;
}
......
......@@ -4,7 +4,7 @@
#include <crtdefs.h>
#define CHAR_BIT 8
#define MB_LEN_MAX 2
#define MB_LEN_MAX 5
#define SCHAR_MIN (-0x80)
#define SCHAR_MAX 0x7f
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment