[Freeciv-Dev] Re: (PR#13276) assert (punit->activity_target < S_LAST) fa
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13276 >
Seems I didn't actually understand what this function was supposed to be
doing. This patch should fix it. Do you have any way to test if this
fixes the problem?
-jason
Index: common/unit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
retrieving revision 1.241
diff -u -r1.241 unit.c
--- common/unit.c 7 Jun 2005 06:17:13 -0000 1.241
+++ common/unit.c 16 Jun 2005 19:36:33 -0000
@@ -954,8 +954,8 @@
}
/**************************************************************************
- Return a mask of the specials which may be pillaged at the given
- tile.
+ Return a mask of the specials which are actively being pillaged on the
+ given tile.
**************************************************************************/
bv_special get_unit_tile_pillage_set(const struct tile *ptile)
{
@@ -963,7 +963,8 @@
BV_CLR_ALL(tgt_ret);
unit_list_iterate(ptile->units, punit) {
- if (punit->activity == ACTIVITY_PILLAGE) {
+ if (punit->activity == ACTIVITY_PILLAGE
+ && punit->activity_target != S_LAST) {
assert(punit->activity_target < S_LAST);
BV_SET(tgt_ret, punit->activity_target);
}
- [Freeciv-Dev] Re: (PR#13276) assert (punit->activity_target < S_LAST) fails,
Jason Short <=
|
|