summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-19 20:40:27 +0000
committerrubidium <rubidium@openttd.org>2011-01-19 20:40:27 +0000
commit6435a89c28f298bf35e901a441909a3f5c975dc6 (patch)
tree3a774193a0701f9f6dbbf35370963f054a0a5db9
parentd426906a010f9e7355986400edcbe1d84b6a70e2 (diff)
downloadopenttd-6435a89c28f298bf35e901a441909a3f5c975dc6.tar.xz
(svn r21863) -Fix (r21849): load the amount that should be loaded instead of the amount that should not be loaded
-rw-r--r--src/cargopacket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp
index 2735a38e5..37091fd66 100644
--- a/src/cargopacket.cpp
+++ b/src/cargopacket.cpp
@@ -313,7 +313,7 @@ bool CargoList<Tinst>::MoveTo(Tother_inst *dest, uint max_move, MoveToAction mta
cp->count = left;
} else {
/* But... the rest needs package splitting. */
- CargoPacket *cp_new = cp->Split(cp->count - max_move);
+ CargoPacket *cp_new = cp->Split(max_move);
static_cast<Tinst *>(this)->RemoveFromCache(cp_new); // this reflects the changes in cp.