2
0
Эх сурвалжийг харах

Rollback: Fail on bad precondition instead of causing assertion error

kwolekr 8 жил өмнө
parent
commit
0ba1cf8203

+ 1 - 0
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) {