mail[Wesnoth-commits] r25033 - /trunk/src/formula_ai.cpp


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

Header


Content

Posted by dragonking on March 23, 2008 - 21:23:
Author: dragonking
Date: Sun Mar 23 21:23:02 2008
New Revision: 25033

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25033&view=rev
Log:
Fixed off-by-one bug in is_village function

Modified:
    trunk/src/formula_ai.cpp

Modified: trunk/src/formula_ai.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_ai.cpp?rev=25033&r1=25032&r2=25033&view=diff
==============================================================================
--- trunk/src/formula_ai.cpp (original)
+++ trunk/src/formula_ai.cpp Sun Mar 23 21:23:02 2008
@@ -329,8 +329,8 @@
                if(args().size() == 2) {
                        loc = 
convert_variant<location_callable>(args()[1]->evaluate(variables))->loc();
                } else {
-                       loc = 
gamemap::location(args()[1]->evaluate(variables).as_int(),
-                                               
args()[2]->evaluate(variables).as_int());
+                       loc = gamemap::location( 
args()[1]->evaluate(variables).as_int() - 1,
+                                               
args()[2]->evaluate(variables).as_int() - 1 );
                }
                return variant(m.is_village(loc));
        }




Related Messages


Powered by MHonArc, Updated Sun Mar 23 22:01:59 2008