Zero an array

Valgrind complained about accessing uninitialised memory
This commit is contained in:
Pasi Kallinen
2019-03-24 13:03:17 +02:00
parent d989b36763
commit f68cb08304

View File

@@ -2285,7 +2285,7 @@ register struct monst *mon;
struct attack *mattk, alt_attk;
struct obj *weapon, **originalweapon;
boolean altwep = FALSE, weapon_used = FALSE, odd_claw = TRUE;
int i, tmp, armorpenalty, sum[NATTK], nsum = 0, dhit = 0, attknum = 0;
int i, tmp, armorpenalty, sum[NATTK] = { 0 }, nsum = 0, dhit = 0, attknum = 0;
int dieroll, multi_claw = 0;
/* with just one touch/claw/weapon attack, both rings matter;