diff options
author | rubidium <rubidium@openttd.org> | 2013-02-17 14:10:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-02-17 14:10:15 +0000 |
commit | 2795ed5b091fa5580976547b3669bac78cd595ce (patch) | |
tree | 9b0d3c0b5444157729363fc0323b6a2236e53d49 /src/autoreplace_cmd.cpp | |
parent | 6647cb917963c4e0d6d633b7a92af78167050893 (diff) | |
download | openttd-2795ed5b091fa5580976547b3669bac78cd595ce.tar.xz |
(svn r25008) -Codechange: Make CargoList::Truncate behave similarly to CargoList::MoveTo, i.e. pass the amount to truncate (fonsinchen)
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r-- | src/autoreplace_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 6afcc48d1..7571da114 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -111,7 +111,7 @@ void CheckCargoCapacity(Vehicle *v) } /* Any left-overs will be thrown away, but not their feeder share. */ - src->cargo.Truncate(src->cargo_cap); + if (src->cargo_cap < src->cargo.Count()) src->cargo.Truncate(src->cargo.Count() - src->cargo_cap); } } |