diff options
-rw-r--r-- | src/station_cmd.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 128528672..b2f6ba3aa 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3307,7 +3307,9 @@ static void UpdateStationRating(Station *st) waiting_changed = true; } - if (waiting_changed) ge->cargo.Truncate(ge->cargo.Count() - waiting); + if (waiting_changed && waiting < ge->cargo.Count()) { + ge->cargo.Truncate(ge->cargo.Count() - waiting); + } } } } |