1
0
Fork 0

(svn r26330) -Fix: the theoretical case of rerouting cargo from one VehicleCargoList to another.

release/1.4
fonsinchen 2014-02-10 18:55:03 +00:00
parent 4f24e33548
commit 82ece7db12
1 changed files with 1 additions and 2 deletions

View File

@ -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. */