[wesnoth-commits] [wesnoth/wesnoth] 284dcc: Lua: crash peacefully with [move_unit]

sevu noreply at github.com
Sun Sep 20 19:16:51 UTC 2020


  Branch: refs/heads/unit_placed_events
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 284dcc23e39c34973341ffee3a3e7496136b05c4
      https://github.com/wesnoth/wesnoth/commit/284dcc23e39c34973341ffee3a3e7496136b05c4
  Author: Severin Glöckner <severin.gloeckner at stud.htwk-leipzig.de>
  Date:   2020-09-20 (Sun, 20 Sep 2020)

  Changed paths:
    M data/lua/wml/move_unit.lua

  Log Message:
  -----------
  Lua: crash peacefully with [move_unit]

If there is an issue with to_x or to_y, such as a missmatching number of values, or none,
then the function is aborted by the 2nd/3rd wml.error statement.

At that place, current_unit:extract() was already called, so the function
would not only fail, but also remove the unit.

Extracting the unit later instead.





More information about the Commits mailing list