Fix moving stuff into a mismatched stack in a "infinite" inventory
authorPerttu Ahola <celeron55@gmail.com>
Sun, 2 Sep 2012 20:01:40 +0000 (23:01 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 2 Sep 2012 20:01:42 +0000 (23:01 +0300)
src/inventorymanager.cpp

index 1a7f56f315534d1791e691997b1eabb20ac95aff..4d862de66c3c9f7f6c3a706f671fa6b7c05d6627 100644 (file)
@@ -351,6 +351,8 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
        if(dst_can_put_count == -1){
                list_to->deleteItem(to_i);
                list_to->addItem(to_i, to_stack_was);
+               list_from->deleteItem(from_i);
+               list_from->addItem(from_i, from_stack_was);
                list_from->takeItem(from_i, count);
        }