(svn r1844) -Fix: small protection in oldloader.c, and put the savegame on pause by default
authortruelight
Mon, 07 Feb 2005 19:23:38 +0000
changeset 1340 50d99579ddd0
parent 1339 46604aca89eb
child 1341 3533880da5d5
(svn r1844) -Fix: small protection in oldloader.c, and put the savegame on pause by default
oldloader.c
--- a/oldloader.c	Mon Feb 07 19:01:56 2005 +0000
+++ b/oldloader.c	Mon Feb 07 19:23:38 2005 +0000
@@ -1269,6 +1269,12 @@
 		if (!LoadChunk(ls, v, vehicle_chunk))
 			return false;
 
+		/* This should be consistent, else we have a big problem... */
+		if (v->index != _current_vehicle_id) {
+			DEBUG(oldloader, 0)("[OldLoader] -- Loading failed - vehicle-array is invalid");
+			return false;
+		}
+
 		if (_old_order_ptr != 0 && _old_order_ptr != 0xFFFFFFFF) {
 			v->orders = GetOrder(REMAP_ORDER_IDX(_old_order_ptr));
 		}
@@ -1614,6 +1620,8 @@
 
 	fclose(_ls.file);
 
+	_pause = 2;
+
 	return true;
 }