From a8b46dfc4b1c3dfe45492786e661e420fb0310ed Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 7 Aug 2004 21:42:05 +0000 Subject: [PATCH] crashbug preferre_weapon==0 --- src/common/kernel/battle.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index 8f4b844b7..298230651 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -2189,14 +2189,13 @@ do_attack(fighter * af) if (au->race->attack[a].type!=AT_STANDARD) continue; else { weapon * wp = preferred_weapon(ta, true); - if (wp->type->reload) continue; + if (wp!=NULL && wp->type->reload) continue; } } - attack(b, ta, &(au->race->attack[a])); + attack(b, ta, &(au->race->attack[a])); } } } - } void