avoid another magic number

Some of the hardcoded +1 scattered about are likely
invlet_gold or invlet_overflow, but I didn't hunt those down.
This commit is contained in:
nhmall
2023-11-30 11:15:32 -05:00
parent 9847fcb5b1
commit d7fef5f194
12 changed files with 44 additions and 26 deletions

View File

@@ -5636,7 +5636,7 @@ destroy_item(int osym, int dmgtyp)
int i, deferral_indx = 0;
/* 1+52+1: try to handle a full inventory; it doesn't matter if
inventory actually has more, even if everything should be deferred */
unsigned short deferrals[1 + 52 + 1]; /* +1: gold, overflow */
unsigned short deferrals[invlet_gold + invlet_basic + invlet_overflow];
(void) memset((genericptr_t) deferrals, 0, sizeof deferrals);
/*