[6935] Use larger buffer instead only formal size increase.

This commit is contained in:
VladimirMangos 2008-12-23 23:45:49 +03:00
parent 0ab8b9a036
commit 904a2c40f3
2 changed files with 13 additions and 13 deletions

View file

@ -285,20 +285,20 @@ bool consoleToUtf8(const std::string& conStr,std::string& utf8str);
bool Utf8FitTo(const std::string& str, std::wstring search);
#if PLATFORM == PLATFORM_WINDOWS
#define UTF8PRINTF(OUT,FRM,RESERR) \
{ \
char temp_buf[32*1024]; \
va_list ap; \
va_start(ap, FRM); \
size_t temp_len = vsnprintf(temp_buf,6000,FRM,ap); \
va_end(ap); \
\
wchar_t wtemp_buf[6000]; \
size_t wtemp_len = 6000-1; \
#define UTF8PRINTF(OUT,FRM,RESERR) \
{ \
char temp_buf[32*1024]; \
va_list ap; \
va_start(ap, FRM); \
size_t temp_len = vsnprintf(temp_buf,32*1024,FRM,ap); \
va_end(ap); \
\
wchar_t wtemp_buf[32*1024]; \
size_t wtemp_len = 32*1024-1; \
if(!Utf8toWStr(temp_buf,temp_len,wtemp_buf,wtemp_len)) \
return RESERR; \
return RESERR; \
CharToOemBuffW(&wtemp_buf[0],&temp_buf[0],wtemp_len+1);\
fprintf(OUT,temp_buf); \
fprintf(OUT,temp_buf); \
}
#else
#define UTF8PRINTF(OUT,FRM,RESERR) \

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6934"
#define REVISION_NR "6935"
#endif // __REVISION_NR_H__