diff options
author | Bardur Arantsson <bardur@scientician.net> | 2013-09-08 11:49:32 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2013-09-27 14:46:43 +0200 |
commit | 88767d9fd11638b90e16da05426b19da9ef2b9b9 (patch) | |
tree | 185a93139f9b119bbdebd840cda377d1550c93a8 /src/init2.cc | |
parent | 7e88e06c6ea90c48c225ac89a7d7685dfa76cd65 (diff) |
Fix an overflow with allocation values
Diffstat (limited to 'src/init2.cc')
-rw-r--r-- | src/init2.cc | 4 |
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]) |