From a0ff6363e6429fded7bd39adacd14a191ef00526 Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 18 May 2009 17:40:03 +0000 Subject: (svn r16353) -Fix (r1): invalid read when OTTD savegame contains VEH_INVALID --- src/saveload/oldloader_sl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/saveload/oldloader_sl.cpp') diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index a0764d408..fc2d2038c 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1260,7 +1260,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num) uint type = ReadByte(ls); switch (type) { default: return false; - case 0x00 /* VEH_INVALID */: v = new (_current_vehicle_id) InvalidVehicle(); break; + case 0x00 /* VEH_INVALID */: v = new (_current_vehicle_id) InvalidVehicle(); break; case 0x25 /* MONORAIL */: case 0x20 /* VEH_TRAIN */: v = new (_current_vehicle_id) Train(); break; case 0x21 /* VEH_ROAD */: v = new (_current_vehicle_id) RoadVehicle(); break; -- cgit v1.2.3-54-g00ecf