From: kwolekr Date: Sat, 15 Aug 2015 18:45:44 +0000 (-0400) Subject: Rollback: Fail on bad precondition instead of causing assertion error X-Git-Tag: 0.4.13~14 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ba1cf82033a810dd2e6178e23794bb135ede46a;p=oweals%2Fminetest.git Rollback: Fail on bad precondition instead of causing assertion error --- diff --git a/src/rollback_interface.cpp b/src/rollback_interface.cpp index 028bd0424..b3f457029 100644 --- a/src/rollback_interface.cpp +++ b/src/rollback_interface.cpp @@ -210,6 +210,7 @@ bool RollbackAction::applyRevert(Map *map, InventoryManager *imgr, IGameDef *gam << inventory_index << " too large in " << "inventory list \"" << inventory_list << "\" in " << inventory_location << std::endl; + return false; } // If item was added, take away item, otherwise add removed item if (inventory_add) {