From 74f5b81004aa55ac2bb9045500bb123ed33e2460 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Fri, 24 Aug 2007 09:39:19 +0200 Subject: [PATCH] Don't use MB_CUR_MAX as array size, as it can be non-constant in some compilers. --- mpdm_s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpdm_s.c b/mpdm_s.c index 828b7dd..53c8884 100644 --- a/mpdm_s.c +++ b/mpdm_s.c @@ -86,7 +86,7 @@ wchar_t * mpdm_mbstowcs(char * str, int * s, int l) with question marks instead of just failing */ { wchar_t * ptr = NULL; - char tmp[MB_CUR_MAX + 1]; + char tmp[64]; /* really MB_CUR_MAX + 1 */ wchar_t wc; int n, i, c, t = 0; char * cstr; @@ -169,7 +169,7 @@ char * mpdm_wcstombs(wchar_t * str, int * s) with question marks instead of just failing */ { char * ptr = NULL; - char tmp[MB_CUR_MAX + 1]; + char tmp[64]; /* really MB_CUR_MAX + 1 */ int l, t = 0; /* allow NULL values for s */ -- 2.11.4.GIT