1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-25 23:49:09 +00:00

(svn r26575) -Change [FS#5995]: Add an assert to catch underflowing action counts.

This commit is contained in:
fonsinchen
2014-05-11 12:49:51 +00:00
parent e673115842
commit a363b2c317

View File

@@ -359,6 +359,7 @@ void VehicleCargoList::AddToCache(const CargoPacket *cp)
*/
void VehicleCargoList::RemoveFromMeta(const CargoPacket *cp, MoveToAction action, uint count)
{
assert(count <= this->action_counts[action]);
this->AssertCountConsistency();
this->RemoveFromCache(cp, count);
this->action_counts[action] -= count;