From 82ece7db12f4cd7d56ddbe3414a0553f636d4259 Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Mon, 10 Feb 2014 18:55:03 +0000 Subject: [PATCH] (svn r26330) -Fix: the theoretical case of rerouting cargo from one VehicleCargoList to another. --- src/cargoaction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cargoaction.cpp b/src/cargoaction.cpp index 929017506a..48c49e99f1 100644 --- a/src/cargoaction.cpp +++ b/src/cargoaction.cpp @@ -224,8 +224,7 @@ bool VehicleCargoReroute::operator()(CargoPacket *cp) } if (this->source != this->destination) { this->source->RemoveFromMeta(cp_new, VehicleCargoList::MTA_TRANSFER, cp_new->Count()); - this->source->AddToMeta(cp_new, VehicleCargoList::MTA_TRANSFER); - this->destination->action_counts[VehicleCargoList::MTA_TRANSFER] += cp_new->Count(); + this->destination->AddToMeta(cp_new, VehicleCargoList::MTA_TRANSFER); } /* Legal, as front pushing doesn't invalidate iterators in std::list. */