Patch level : 2.1 nopatch

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :

Aggiunto supporto (non strettamente necessario) per valute con codici
conteneti caratteri ASCII strani > 127.


git-svn-id: svn://10.65.10.50/trunk@12276 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2004-08-04 14:49:15 +00:00
parent 2de6140acf
commit 5d36a7772d
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
#include <keys.h>
#ifdef WIN32
#define buildmsg() char msg[256];va_list argptr;va_start(argptr,fmt);_vsnprintf(msg,sizeof(msg),fmt,argptr);va_end(argptr)
#define buildmsg() char msg[256];va_list argptr;va_start(argptr,fmt);_vsnprintf(msg,sizeof(msg),fmt,argptr);va_end(argptr);msg[255] = '\0';
#else
#define buildmsg() char msg[256];va_list argptr;va_start(argptr,fmt);vsprintf(msg,fmt,argptr);va_end(argptr)
#endif

View File

@ -160,7 +160,7 @@ void TDowJones::test_cache()
const char* TDowJones::expand_value(const char* val)
{
if (val && *val > ' ')
if (val && (*val > ' ' || *val < '\0'))
{
if (*val == '_')
{

View File

@ -858,7 +858,7 @@ TString& TString::format(
va_start(pars, fmt);
#ifdef WIN32
const unsigned int tot = _vsnprintf(spark, sizeof(spark), fmt, pars);
const unsigned int tot = _vsnprintf(spark, sizeof(spark)+1, fmt, pars);
#else
const unsigned int tot = vsprintf(spark, fmt, pars);
#endif
@ -1045,7 +1045,7 @@ TString& TFixed_string::format(
va_list pars;
va_start(pars, fmt);
#ifdef WIN32
const int tot = _vsnprintf(_str, size(), fmt, pars);
const int tot = _vsnprintf(_str, size()+1, fmt, pars);
#else
const int tot = vsprintf(_str, fmt, pars);
#endif