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.

This commit is contained in:
Orion Poplawski 2015-02-02 16:14:59 -07:00 committed by Alexandre Julliard
parent f0fc2ba27d
commit 8bf1732962
3 changed files with 3 additions and 3 deletions
dlls/msvcrt
include/msvcrt

View File

@ -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

View File

@ -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;
}

View File

@ -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