Account for terminator in sTrappingMoves

This commit is contained in:
BuffelSaft 2021-11-05 18:37:45 +13:00
parent bf786c6c9a
commit 3f1ce399e6

View file

@ -2983,7 +2983,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; ; gBattleCommunication[MULTISTRING_CHOOSER]++)
{
if (gBattleCommunication[MULTISTRING_CHOOSER] > ARRAY_COUNT(sTrappingMoves))
if (gBattleCommunication[MULTISTRING_CHOOSER] > ARRAY_COUNT(sTrappingMoves) - 1)
break;
if (sTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]] == gCurrentMove)
break;