Patch level :

Files correlati     : 777.exe
Ricompilazione Demo : [ ]
Commento            :
777200.cpp   Codice errore non disponibile in quanto trattasi di
             modulo che sfugge a tutte le regole del buon senso.
             Correzioni sulla formattazione dei numeri e
             delle date dell'invio del 770 per Dylog.


git-svn-id: svn://10.65.10.50/trunk@7311 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1998-10-22 14:43:00 +00:00
parent 16b58fd72b
commit 652a5b3e19

View File

@ -468,8 +468,10 @@ void TRecordDylog::set(const char* val, char tipo, int pos, int len)
// Controlla date // Controlla date
if (len == 8 && lenstr == 10 && str[2] == '-' && str[5] == '-') if (len == 8 && lenstr == 10 && str[2] == '-' && str[5] == '-')
{ {
str.strip("-"); int aaaa, mm, gg;
lenstr = len; sscanf(str, "%d-%d-%d", &gg, &mm, &aaaa);
str.format("%04d%02d%02d", aaaa, mm, gg);
lenstr = 8;
} else } else
// Controlla numeri reali // Controlla numeri reali
if (len == 11) if (len == 11)
@ -478,7 +480,10 @@ void TRecordDylog::set(const char* val, char tipo, int pos, int len)
if (point >= 0) if (point >= 0)
str.cut(lenstr = point); str.cut(lenstr = point);
if (real::is_null(str)) if (real::is_null(str))
str.cut(lenstr = 0); {
str = "0";
lenstr = 1;
}
} }
} }
@ -492,7 +497,7 @@ void TRecordDylog::set(const char* val, char tipo, int pos, int len)
if (lenstr != len) if (lenstr != len)
{ {
if (tipo == 'N') if (tipo == 'N')
str.right_just(len); str.right_just(len, '0');
else else
str.left_just(len); str.left_just(len);
} }