forked from mirror/OpenTTD
(svn r22057) -Fix: waypoint conversion could (previously) silently overfill the pool and crash
This commit is contained in:
@@ -93,6 +93,8 @@ void MoveWaypointsToBaseStations()
|
||||
}
|
||||
}
|
||||
|
||||
if (!Waypoint::CanAllocateItem(_old_waypoints.Length())) SlError(STR_ERROR_TOO_MANY_STATIONS_LOADING);
|
||||
|
||||
/* All saveload conversions have been done. Create the new waypoints! */
|
||||
for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) {
|
||||
Waypoint *new_wp = new Waypoint(wp->xy);
|
||||
|
Reference in New Issue
Block a user