[Commits] [wesnoth/wesnoth] 6e19ec: gui2/tunit_attack: Fix non-deterministic crashes
GitHub
noreply at github.com
Sun Mar 6 02:19:59 UTC 2016
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 6e19ec731eaf8018163a05a20844b7e442f71425
https://github.com/wesnoth/wesnoth/commit/6e19ec731eaf8018163a05a20844b7e442f71425
Author: Ignacio R. Morelle <shadowm at wesnoth.org>
Date: 2016-03-05 (Sat, 05 Mar 2016)
Changed paths:
M changelog
M players_changelog
M src/gui/dialogs/unit_attack.cpp
Log Message:
-----------
gui2/tunit_attack: Fix non-deterministic crashes
t_string's implicit conversion to const std::string& returns a reference
to a(n aggregate class) field that gets destroyed as soon as the
t_string is, so binding this to a const reference does not extend the
referenced object's lifetime, resulting in a dangling reference and UB.
More information about the Commits
mailing list