Author: silene
Date: Sun Apr 5 21:21:44 2009
New Revision: 34564
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34564&view=rev
Log:
fix a bug with auto-stored WML variables not being restored correctly to their
previous state afterwards (spotted by silene)
(backport from revision 34562)
Modified:
branches/1.6/changelog
branches/1.6/src/variable.cpp
Modified: branches/1.6/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/changelog?rev=34564&r1=34563&r2=34564&view=diff
==============================================================================
--- branches/1.6/changelog (original)
+++ branches/1.6/changelog Sun Apr 5 21:21:44 2009
@@ -23,6 +23,7 @@
* Fixed compilation with -D_GLIBCXX_PARALLEL
* Fixed handling of floating-point WML constants on localized Windows
(impacts "submerge" animations and AI settings)
+ * Fixed a bug with auto-stored WML variables not being restored correctly
Version 1.6a:
* User interface:
Modified: branches/1.6/src/variable.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/variable.cpp?rev=34564&r1=34563&r2=34564&view=diff
==============================================================================
--- branches/1.6/src/variable.cpp (original)
+++ branches/1.6/src/variable.cpp Sun Apr 5 21:21:44 2009
@@ -483,7 +483,7 @@
{
const config::child_list& children =
repos->get_variables().get_children(var_name_);
for(config::child_list::const_iterator i = children.begin(); i !=
children.end(); ++i) {
- previous_val_.append(**i);
+ previous_val_.add_child(var_name_, **i);
}
repos->clear_variable_cfg(var_name_);
repos->add_variable_cfg(var_name_, var_value);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits