From 652a5b3e194ddd21764c0da0a89d384dc4839f05 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 22 Oct 1998 14:43:00 +0000 Subject: [PATCH] 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 --- m770/777200.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/m770/777200.cpp b/m770/777200.cpp index cbeac3ee2..86030b11e 100755 --- a/m770/777200.cpp +++ b/m770/777200.cpp @@ -468,8 +468,10 @@ void TRecordDylog::set(const char* val, char tipo, int pos, int len) // Controlla date if (len == 8 && lenstr == 10 && str[2] == '-' && str[5] == '-') { - str.strip("-"); - lenstr = len; + int aaaa, mm, gg; + sscanf(str, "%d-%d-%d", &gg, &mm, &aaaa); + str.format("%04d%02d%02d", aaaa, mm, gg); + lenstr = 8; } else // Controlla numeri reali if (len == 11) @@ -478,7 +480,10 @@ void TRecordDylog::set(const char* val, char tipo, int pos, int len) if (point >= 0) str.cut(lenstr = point); 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 (tipo == 'N') - str.right_just(len); + str.right_just(len, '0'); else str.left_just(len); }