From 85f78075db1c0f1d9e9a1f74cefdc6f9582ab9be Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 10 Jun 2004 15:53:08 +0000 Subject: [PATCH] Patch level : 2.1 nopatch Files correlati : Ricompilazione Demo : [ ] Commento : Corretto ordinamento campi git-svn-id: svn://10.65.10.50/trunk@12176 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/report.cpp | 6 +++--- include/strings.cpp | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/report.cpp b/include/report.cpp index 5887e57fc..094033ec3 100755 --- a/include/report.cpp +++ b/include/report.cpp @@ -1566,12 +1566,12 @@ int TReport_field::compare(const TSortable& s) const { const TReport_field& rf = (TReport_field&)s; - int cmp = _rct.y - rf._rct.y; + int cmp = _id - rf._id; if (cmp == 0) { - cmp = _rct.x - rf._rct.x; + cmp = _rct.y - rf._rct.y; if (cmp == 0) - cmp = _id - rf._id; + cmp = _rct.x - rf._rct.x; } return cmp; } diff --git a/include/strings.cpp b/include/strings.cpp index 7409e77fd..3b7f7dcb3 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -26,7 +26,6 @@ TString& user() { static TString8 _user; - return _user; } @@ -857,7 +856,12 @@ TString& TString::format( char spark[512]; va_list pars; va_start(pars, fmt); + +#ifdef WIN32 + const unsigned int tot = _vsnprintf(spark, sizeof(spark), fmt, pars); +#else const unsigned int tot = vsprintf(spark, fmt, pars); +#endif va_end(pars); CHECK(tot < sizeof(spark), "Ue'! Quanto scrivi?"); @@ -1040,7 +1044,11 @@ TString& TFixed_string::format( { va_list pars; va_start(pars, fmt); +#ifdef WIN32 + const int tot = _vsnprintf(_str, size(), fmt, pars); +#else const int tot = vsprintf(_str, fmt, pars); +#endif va_end(pars); CHECK(tot >= 0 && tot <= size(), "Ue'! Quanto scrivi con 'sta format?"); return *this;