summaryrefslogtreecommitdiff
path: root/oldloader.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-03-18 08:00:27 +0000
committercelestar <celestar@openttd.org>2006-03-18 08:00:27 +0000
commit480ea7c671b48b87f184098f305bccca6e986fb0 (patch)
treeb33548d3513e245a98d65a5debc42aebfe66c8c7 /oldloader.c
parent0d310e213ab7d85d55f87b452484e7739e33ebf0 (diff)
downloadopenttd-480ea7c671b48b87f184098f305bccca6e986fb0.tar.xz
(svn r3939) -Fix: No longer assume that the number of slots is 2. It was not a problem up to now, but it's not The Right Thing (TM) to do either
Diffstat (limited to 'oldloader.c')
-rw-r--r--oldloader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/oldloader.c b/oldloader.c
index b786f321c..4489e44f1 100644
--- a/oldloader.c
+++ b/oldloader.c
@@ -356,6 +356,7 @@ static void FixOldTowns(void)
static void FixOldStations(void)
{
Station *st;
+ int i;
FOR_ALL_STATIONS(st) {
/* Check if we need to swap width and height for the station */
@@ -372,7 +373,7 @@ static void FixOldStations(void)
st->bus_stops->station = st->index;
st->bus_stops->next = NULL;
st->bus_stops->prev = NULL;
- st->bus_stops->slot[0] = st->bus_stops->slot[1] = INVALID_VEHICLE;
+ for (i = 0; i < NUM_SLOTS; i++) st->bus_stops->slot[i] = INVALID_VEHICLE;
}
if (st->lorry_tile_obsolete != 0) {
@@ -383,7 +384,7 @@ static void FixOldStations(void)
st->truck_stops->station = st->index;
st->truck_stops->next = NULL;
st->truck_stops->prev = NULL;
- st->truck_stops->slot[0] = st->truck_stops->slot[1] = INVALID_VEHICLE;
+ for (i = 0; i < NUM_SLOTS; i++) st->truck_stops->slot[i] = INVALID_VEHICLE;
}
}
}