(svn r20819) -Fix [FS#3714]: be a bit more "lenient" w.r.t. invalid savegames; don't crash on saveload related NOT_REACHEDs, just show the user an error that the savegame is corrupted

This commit is contained in:
rubidium
2010-09-16 22:06:36 +00:00
parent 76bd43dbff
commit f3cf16f529
6 changed files with 46 additions and 32 deletions

View File

@@ -150,7 +150,7 @@ void ConvertOldMultiheadToNew()
u->SetWagon();
u->SetFreeWagon();
break;
default: NOT_REACHED();
default: SlErrorCorrupt("Invalid train subtype");
}
}
}
@@ -714,7 +714,7 @@ void Load_VEHS()
case VEH_EFFECT: v = new (index) EffectVehicle(); break;
case VEH_DISASTER: v = new (index) DisasterVehicle(); break;
case VEH_INVALID: // Savegame shouldn't contain invalid vehicles
default: NOT_REACHED();
default: SlErrorCorrupt("Invalid vehicle type");
}
SlObject(v, GetVehicleDescription(vtype));