r2022 - very old games which have wrong month cause crash September 17, 2008, 04:31:16 pm simutrans r2022 GDIVery old games (86.00, 86.05) seem to have wrong month value in save game.As a result of this change in r1912...- some games cause crash when loading (r1983 and after version), or date back (r1912-r1982)- some games jump to the future, for example, from 04/2001 to 01/2072QuoteCall stack:004441A0 sim1983.exe:004441A0 translator::lang_info::translate(char const*) const translator.cc:34 ... { if (text == NULL) return "(null)";> if (text[0] == '\0') return text; const char* trans = texts.get(text); return trans != NULL ? trans : text;Patch attached.QuoteIndex: simworld.cc===================================================================--- simworld.cc (r2022)+++ simworld.cc (copy)@@ -3136,6 +3136,8 @@ if(file->get_version()<86006) { letztes_jahr += umgebung_t::starting_year; }+ // old game might have wrong month+ letzter_monat %= 12; // set the current month count setze_ticks_bits_per_tag(einstellungen->gib_bits_per_month()); current_month = letzter_monat + (letztes_jahr*12); Quote Selected
Re: r2022 - very old games which have wrong month cause crash Reply #1 – September 19, 2008, 08:48:14 pm Thank you. Quote Selected
[solved]Re: r2022 - very old games which have wrong month cause crash Reply #2 – September 20, 2008, 12:44:36 pm Solved in r2029. Thank you. Quote Selected