(svn r16057) -Fix [FS#2834] (r16037): division by zero when having an order with only one station that has either middle or near end stop location and where the platform is (significantly) longer than the train.

This commit is contained in:
rubidium
2009-04-13 22:27:21 +00:00
parent 244834a268
commit 3d5a7496c7
2 changed files with 11 additions and 8 deletions

View File

@@ -2681,7 +2681,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
* begin of the platform to the stop location is longer than the length
* of the platform. Station ahead 'includes' the current tile where the
* vehicle is on, so we need to substract that. */
if (station_length <= stop + station_ahead - TILE_SIZE) return VETSB_CONTINUE;
if (!IsInsideBS(stop + station_ahead, station_length, TILE_SIZE)) return VETSB_CONTINUE;
DiagDirection dir = DirToDiagDir(v->direction);