summaryrefslogtreecommitdiff
path: root/src/object2.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-09-08 12:36:06 +0200
committerBardur Arantsson <bardur@scientician.net>2013-09-27 14:46:43 +0200
commit5a60ce1f8ab8a6a34cf55b637dd601b5d4422197 (patch)
tree1c5b8423c02f5ab442a340db3d240974b086cff6 /src/object2.cc
parent88767d9fd11638b90e16da05426b19da9ef2b9b9 (diff)
Fix undefined behavior when too many "flag rarity groups" were used
Diffstat (limited to 'src/object2.cc')
-rw-r--r--src/object2.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object2.cc b/src/object2.cc
index c2808957..754a6b91 100644
--- a/src/object2.cc
+++ b/src/object2.cc
@@ -4277,7 +4277,7 @@ try_an_other_ego:
e_ptr = &e_info[e_idx];
/* Hack -- extra powers */
- for (j = 0; j < 5; j++)
+ for (j = 0; j < FLAG_RARITY_MAX; j++)
{
/* Rarity check */
if (magik(e_ptr->rar[j]))