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); }