[wesnoth-commits] [wesnoth/wesnoth] fa8e30: fix OOS when undoing actions with synced choices
GitHub
noreply at github.com
Tue Apr 3 11:59:30 UTC 2018
Branch: refs/heads/1.14
Home: https://github.com/wesnoth/wesnoth
Commit: fa8e301c93df0f576d8f71c3fa0831afe5dbe23b
https://github.com/wesnoth/wesnoth/commit/fa8e301c93df0f576d8f71c3fa0831afe5dbe23b
Author: gfgtdf <daniel.gfgtdf at gmail.com>
Date: 2018-04-03 (Tue, 03 Apr 2018)
Changed paths:
M src/playmp_controller.cpp
M src/playturn.cpp
M src/synced_context.cpp
M src/synced_context.hpp
Log Message:
-----------
fix OOS when undoing actions with synced choices
The problm was that the old code tried to use `undo_stack().can_undo()`
to check whether the current action can be undone. But
`undo_stack().can_undo()` uses the undo stack which is only updated at
the end of each action, so it cannot be used to check whether the action
that is currently executed can be undone.
This code removes some assertion that were wrong due to the
justmentioned.
More information about the Commits
mailing list