UB when using Gravity #6036
Labels
bug
Bug
category: battle-mechanic
Pertains to battle mechanics
status: unconfirmed
This bug has not been reproduced yet
Description
Using gravity leads to UB due to
jumpifnexttargetvalid
iterating over gBattlerTarget. gBattlerTarget ends up being 4 and accessesgLastHitBy
inCmd_moveend
(caseMOVEEND_UPDATE_LAST_MOVES
) out of bounds. (https://github.com/rh-hideout/pokeemerald-expansion/blob/75d5edad08fba9c2ae478c78ced865cbf4e90fa4/src/battle_script_commands.c/#L6459)Other moves using
jumpifnexttargetvalid
are potentially affected as well.Version
upcoming (Edge)
Upcoming/master Version
75d5eda
Discord contact info
.cawt
The text was updated successfully, but these errors were encountered: