Follow-up Comment #8, bug #16775 (project freeciv):

--- server/unithand.c   (revision 18197)
+++ server/unithand.c   (working copy)
@@ -1409,7 +1409,9 @@
     }
 
     /* The attack is legal wrt the alliances */
-    victim = get_defender(punit, pdesttile);
+    if (is_attack_unit(punit)) {
+      victim = get_defender(punit, pdesttile);
+    }

I think this part is wrong.  By letting victim stay as NULL, this allows the
move to proceed.  But this is the case where an explorer is trying to move
into an enemy tile which should not be allowed.  I think the move needs to be
denied with a return call, as happens in a lot of places higher up in that
function.

-jason

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16775>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to