[Freeciv-Dev] bugfix for can_unit_attack_tile()
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.178
diff -u -r1.178 unittools.c
--- server/unittools.c 2002/06/01 19:25:26 1.178
+++ server/unittools.c 2002/08/13 15:01:42
@@ -160,6 +160,10 @@
{
struct unit *pdefender;
pdefender=get_defender(punit, dest_x, dest_y);
+ if (!pfedender) {
+ /* nothing to attack */
+ return FALSE;
+ }
return(can_unit_attack_unit_at_tile(punit, pdefender, dest_x, dest_y));
}
Since calling can_unit_attack_unit_at_tile() with NULL as second parameter
gives us a core.
Yours
Per
- [Freeciv-Dev] bugfix for can_unit_attack_tile(),
Per I. Mathisen <=
|
|