(svn r16353) -Fix (r1): invalid read when OTTD savegame contains VEH_INVALID

This commit is contained in:
smatz 2009-05-18 17:40:03 +00:00
parent 8808f3beea
commit a0ff6363e6
2 changed files with 2 additions and 2 deletions

View File

@ -698,7 +698,7 @@ void Load_VEHS()
case VEH_AIRCRAFT: v = new (index) Aircraft(); break; case VEH_AIRCRAFT: v = new (index) Aircraft(); break;
case VEH_EFFECT: v = new (index) EffectVehicle(); break; case VEH_EFFECT: v = new (index) EffectVehicle(); break;
case VEH_DISASTER: v = new (index) DisasterVehicle(); break; case VEH_DISASTER: v = new (index) DisasterVehicle(); break;
case VEH_INVALID: v = new (index) InvalidVehicle(); break; case VEH_INVALID: /* Savegame shouldn't contain invalid vehicles */
default: NOT_REACHED(); default: NOT_REACHED();
} }