<URL: http://bugs.freeciv.org/Ticket/Display.html?id=37930 >

 This fixes a crash when ai fails to select attacker. Affects both
trunk and S2_1.


 - ML

diff -Nurd -X.diff_ignore freeciv/ai/advmilitary.c freeciv/ai/advmilitary.c
--- freeciv/ai/advmilitary.c	2007-03-05 19:14:29.000000000 +0200
+++ freeciv/ai/advmilitary.c	2007-03-11 09:35:23.000000000 +0200
@@ -1403,7 +1403,7 @@
    * (in which case, we might want a ferry before an attacker)
    */
   punittype = ai_choose_attacker(pcity, LAND_MOVING);
-  if (punittype >= 0) {
+  if (punittype) {
     virtualunit = create_unit_virtual(pplayer, pcity, punittype, 1);
     kill_something_with(pplayer, pcity, virtualunit, choice);
     destroy_unit_virtual(virtualunit);
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to