mail[Wesnoth-commits] r33385 - /trunk/src/game_events.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by kailoran on March 07, 2009 - 16:19:
Author: ilor
Date: Sat Mar  7 16:19:23 2009
New Revision: 33385

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33385&view=rev
Log:
fix crash when trying to round a nonexistent variable, fixes the part of bug 
#13134 that I was able to reproduce

Modified:
    trunk/src/game_events.cpp

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=33385&r1=33384&r2=33385&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sat Mar  7 16:19:23 2009
@@ -1208,7 +1208,7 @@
 
                const std::string round_val = cfg["round"];
                if(round_val.empty() == false) {
-                       double value = lexical_cast<double>(var.c_str());
+                       double value = 
lexical_cast_default<double>(var.c_str());
                        if (round_val == "ceil") {
                                value = std::ceil(value);
                        } else if (round_val == "floor") {




Related Messages


Powered by MHonArc, Updated Sat Mar 07 16:40:36 2009