--- a/station_cmd.c Tue Dec 05 12:17:31 2006 +0000
+++ b/station_cmd.c Tue Dec 05 13:58:20 2006 +0000
@@ -2548,7 +2548,7 @@
if (_game_mode == GM_EDITOR) return;
i = _station_tick_ctr;
- if (++_station_tick_ctr == GetStationArraySize()) _station_tick_ctr = 0;
+ if (++_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0;
if (IsValidStationID(i)) StationHandleBigTick(GetStation(i));
@@ -3098,7 +3098,7 @@
}
/* This is to ensure all pointers are within the limits of _stations_size */
- if (_station_tick_ctr > GetStationArraySize()) _station_tick_ctr = 0;
+ if (_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0;
}
static void Save_ROADSTOP(void)