summaryrefslogtreecommitdiff
path: root/src/code/z_player_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/z_player_lib.c')
-rw-r--r--src/code/z_player_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index 749096a06..6d056dd58 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -2036,7 +2036,7 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
// Note: The increment would not be done for the root limb, even if it had a non-NULL `dList`.
// So if the root limb had a non-NULL `dList` (which is not the case in vanilla),
// an out-of-bounds write to `bodyPartsPos` would occur.
- sPlayerCurBodyPartPos = &player->bodyPartsPos[-1];
+ sPlayerCurBodyPartPos = &player->bodyPartsPos[0] - 1;
if (player->transformation != PLAYER_FORM_FIERCE_DEITY) {
if (!(player->skelAnime.moveFlags & ANIM_FLAG_4) || (player->skelAnime.moveFlags & ANIM_FLAG_1)) {