From 7bdb417cf264f60d71ff17ed27354841b6e1b4ec Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Sat, 26 Sep 2015 03:20:58 +0200 Subject: [PATCH] ignore [allow_undo] in wml menu handlers since it casues OOS https://gna.org/bugs/?23903 --- src/synced_commands.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/synced_commands.cpp b/src/synced_commands.cpp index d979164099a2..68b67507f566 100644 --- a/src/synced_commands.cpp +++ b/src/synced_commands.cpp @@ -301,7 +301,6 @@ SYNCED_COMMAND_HANDLER_FUNCTION(fire_event, child, /*use_undo*/, /*show*/, /*er BOOST_FOREACH(const config &v, child.child_range("set_variable")) { resources::gamedata->set_variable(v["name"], v["value"]); } - bool undoable = true; if(const config &last_select = child.child("last_select")) { @@ -310,12 +309,11 @@ SYNCED_COMMAND_HANDLER_FUNCTION(fire_event, child, /*use_undo*/, /*show*/, /*er } const std::string &event_name = child["raise"]; if (const config &source = child.child("source")) { - undoable = undoable & !game_events::fire(event_name, map_location(source, resources::gamedata)); + game_events::fire(event_name, map_location(source, resources::gamedata)); } else { - undoable = undoable & !game_events::fire(event_name); + game_events::fire(event_name); } - if ( !undoable) - resources::undo_stack->clear(); + resources::undo_stack->clear(); return true; }