Fix out-of-bounds
makemon.c: In function 'init_mongen_order':
makemon.c:1806:25: warning: iteration 383 invokes undefined behavior [-Waggressive-loop-optimizations]
1806 | mongen_order[i] = i;
| ~~~~~~~~~~~~~~~~^~~
makemon.c:1805:24: note: within this loop
1805 | for (i = LOW_PM; i <= NUMMONS; i++)
| ~~^~~~~~~~~~
This commit is contained in:
@@ -1802,7 +1802,7 @@ init_mongen_order(void)
|
||||
return;
|
||||
|
||||
mongen_order_init = TRUE;
|
||||
for (i = LOW_PM; i <= NUMMONS; i++)
|
||||
for (i = LOW_PM; i < NUMMONS; i++)
|
||||
mongen_order[i] = i;
|
||||
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||
|
||||
Reference in New Issue
Block a user