summaryrefslogtreecommitdiff
path: root/src/init2.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-09-08 11:49:32 +0200
committerBardur Arantsson <bardur@scientician.net>2013-09-27 14:46:43 +0200
commit88767d9fd11638b90e16da05426b19da9ef2b9b9 (patch)
tree185a93139f9b119bbdebd840cda377d1550c93a8 /src/init2.cc
parent7e88e06c6ea90c48c225ac89a7d7685dfa76cd65 (diff)
Fix an overflow with allocation values
Diffstat (limited to 'src/init2.cc')
-rw-r--r--src/init2.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init2.cc b/src/init2.cc
index 4fb97a7e..1255699b 100644
--- a/src/init2.cc
+++ b/src/init2.cc
@@ -1910,7 +1910,7 @@ static errr init_alloc(void)
k_ptr = &k_info[i];
/* Scan allocation pairs */
- for (j = 0; j < 4; j++)
+ for (j = 0; j < ALLOCATION_MAX; j++)
{
/* Count the "legal" entries */
if (k_ptr->chance[j])
@@ -1949,7 +1949,7 @@ static errr init_alloc(void)
k_ptr = &k_info[i];
/* Scan allocation pairs */
- for (j = 0; j < 4; j++)
+ for (j = 0; j < ALLOCATION_MAX; j++)
{
/* Count the "legal" entries */
if (k_ptr->chance[j])