diff options
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 9289fa39a..23ac09e7b 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2973,6 +2973,9 @@ void FindStationsAroundTiles(TileIndex tile, int w_prod, int h_prod, StationList uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount) { + /* Return if nothing to do. Also the rounding below fails for 0. */ + if (amount == 0) return 0; + Station *st1 = NULL; // Station with best rating Station *st2 = NULL; // Second best station uint best_rating1 = 0; // rating of st1 |