mail[Wesnoth-commits] r13375 - /trunk/src/unit_animation.cpp


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

Header


Content

Posted by jeremy . rosen on September 03, 2006 - 14:19:
Author: boucman
Date: Sun Sep  3 14:19:09 2006
New Revision: 13375

URL: http://svn.gna.org/viewcvs/wesnoth?rev=13375&view=rev
Log:
fix a WML crash when an else statement was the last in an animation

Modified:
    trunk/src/unit_animation.cpp

Modified: trunk/src/unit_animation.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=13375&r1=13374&r2=13375&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Sun Sep  3 14:19:09 2006
@@ -52,8 +52,8 @@
                                expanded_chunk.append(*(*child).second);
                                to_add.push_back(expanded_chunk);
                                child++;
-                               if(*(*child).first == "else") {
-                                       while(*(*child).first == "else") {
+                               if(child != analyzed_anim.ordered_end() && 
*(*child).first == "else") {
+                                       while(child != 
analyzed_anim.ordered_end() && *(*child).first == "else") {
                                                expanded_chunk = 
expanded_anim;
                                                // add the content of else to 
the stored one
                                                
expanded_chunk.append(*(*child).second);
@@ -63,7 +63,7 @@
                                        }
 
                                } else {
-                                       // add an animw with the if part 
removed
+                                       // add an anim with the if part 
removed
                                        to_add.push_back(expanded_anim);
                                }
                                // copy the end of the anim "as is" other if 
will be treated later




Related Messages


Powered by MHonArc, Updated Sun Sep 03 15:00:14 2006