diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-11-14 08:46:22 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-14 22:46:22 +1100 |
| commit | 3d150f3e1d84259b05f2831be35fa6fd38e43232 (patch) | |
| tree | e737c09137a04cdac7b15d0e190d6ca3b3fd0503 /src/code/z_player_lib.c | |
| parent | 60ddc5891e1cdef2e32f695c96e60344d7a51c26 (diff) | |
Misc fixes 1 (#1491)
* Some low-hanging UB
* document bug on z_file_nameset_NES.c
* ALIGNED on audio data
* document bug on decode
* document bugs on Message_Decode
* Format
* More ALIGNED
* Put the ALIGNED macro at the right like the other uses in the repo
* review
* fix Message Decode
(cherry picked from commit abfbc7068816756f7ea3fa4a36ee0fe664c54c72)
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
* remove comments
* Update src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
* format
---------
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Diffstat (limited to 'src/code/z_player_lib.c')
| -rw-r--r-- | src/code/z_player_lib.c | 2 |
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)) { |
