diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-11-22 19:10:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 19:10:49 -0500 |
commit | e0fae879da1b773bf90fca145e047ccdb7613938 (patch) | |
tree | b1be0ec73e33fccf2fe2deac44d62aa10ae391e4 /src/script_pokemon_util.c | |
parent | 5cb875b6cb798cf890e156f54a150ff90735ddab (diff) | |
parent | 42a83ee50e3364f3f7361dacb3d3616053f4c5bf (diff) |
Merge pull request #1558 from GriffinRichards/update-macros
Update event macro comments
Diffstat (limited to 'src/script_pokemon_util.c')
-rwxr-xr-x | src/script_pokemon_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |