Inventory manager style cleanup and further checks

This commit is contained in:
est31 2015-07-01 17:03:02 +02:00
parent b2160bcecd
commit 2e44873ac9

@ -246,6 +246,13 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
move_somewhere = true; move_somewhere = true;
return; return;
} }
if ((u16)to_i > list_to->getSize()) {
infostream << "IMoveAction::apply(): FAIL: destination index out of bounds: "
<< "to_i=" << to_i
<< ", size=" << list_to->getSize() << std::endl;
return;
}
/* /*
Do not handle rollback if both inventories are that of the same player Do not handle rollback if both inventories are that of the same player
*/ */