From d026b324fdaac8b4123fdc9860754ba405a7e415 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 31 Jul 2005 08:11:29 +0000 Subject: [PATCH] uninitialized variables --- src/common/kernel/battle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index dc661aaaa..02ba636a9 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -923,7 +923,7 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile) side *ds = df->side; int hp; - int ar, an, am; + int ar = 0, an, am; const armor_type * armor = select_armor(dt, true); const armor_type * shield = select_armor(dt, false); @@ -965,7 +965,7 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile) sd = weapon_effskill(dt, at, weapon, false, false); if (weapon!=NULL) dwtype=weapon->type; - if (armor) ar = armor->prot; + if (armor) ar += armor->prot; if (shield) ar += shield->prot; /* natürliche Rüstung */