Fix piranha plant bubble crash on ARM

This commit is contained in:
Agent X 2024-09-06 16:43:12 -04:00
parent 63ee843b60
commit 7fe3d281c6

View file

@ -32,6 +32,9 @@ void bhv_piranha_plant_bubble_loop(void) {
f32 scale = 0; f32 scale = 0;
s32 i; s32 i;
s32 frame = parent->header.gfx.animInfo.animFrame; s32 frame = parent->header.gfx.animInfo.animFrame;
if (frame < 0) {
frame = 0;
}
// TODO: rename lastFrame if it is inaccurate // TODO: rename lastFrame if it is inaccurate
if (parent->header.gfx.animInfo.curAnim == NULL) { return; } if (parent->header.gfx.animInfo.curAnim == NULL) { return; }
s32 lastFrame = parent->header.gfx.animInfo.curAnim->loopEnd - 2; s32 lastFrame = parent->header.gfx.animInfo.curAnim->loopEnd - 2;