From 63c5905914b40d33e45a6a3101ab5a7da4375918 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 16 Nov 2021 10:53:18 -0500 Subject: Continue updating event macro comments --- src/script_pokemon_util.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/script_pokemon_util.c') diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 07e86656e..ae7aa92dc 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -150,7 +150,12 @@ void CreateScriptedWildMon(u16 species, u8 level, u16 item) void ScriptSetMonMoveSlot(u8 monIndex, u16 move, u8 slot) { +// Allows monIndex to go out of bounds of gPlayerParty. Doesn't occur in vanilla +#ifdef BUGFIX + if (monIndex >= PARTY_SIZE) +#else if (monIndex > PARTY_SIZE) +#endif monIndex = gPlayerPartyCount - 1; SetMonMoveSlot(&gPlayerParty[monIndex], move, slot); -- cgit v1.2.3