Various BUGFIXes and UBFIXes
This commit is contained in:
@@ -1399,8 +1399,12 @@ void GenerateBattlePyramidWildMon(void)
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
SetMonMoveSlot(&gEnemyParty[0], wildMons[id].moves[i], i);
|
||||
|
||||
// BUG: Reading outside the array as lvl was used for mon level instead of frontier lvl mode.
|
||||
// UB: Reading outside the array as lvl was used for mon level instead of frontier lvl mode.
|
||||
#ifndef UBFIX
|
||||
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[lvl] >= 140)
|
||||
#else
|
||||
if (gSaveBlock2Ptr->frontier.pyramidWinStreas[gSaveBlock2Ptr->frontier.lvlMode] >= 140)
|
||||
#endif
|
||||
{
|
||||
id = (Random() % 17) + 15;
|
||||
for (i = 0; i < NUM_STATS; i++)
|
||||
|
||||
Reference in New Issue
Block a user