diff options
| author | Random06457 <28494085+Random06457@users.noreply.github.com> | 2023-11-20 23:18:02 +0100 |
|---|---|---|
| committer | Random06457 <28494085+Random06457@users.noreply.github.com> | 2023-11-20 23:18:02 +0100 |
| commit | e650836e659b8e28fc4c9083d5a2035e7edc8efb (patch) | |
| tree | d07837e590d130ae34bfcf973564fc7e27250859 | |
| parent | 641bfa901b4b5e18ab25afa681427dbdd65ddd1e (diff) | |
fix OOB accesses in z_file_choose / z_file_nameset
| -rw-r--r-- | mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c | 2 | ||||
| -rw-r--r-- | mm/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c b/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c index c76b9c15f..7b506e8b6 100644 --- a/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c +++ b/mm/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c @@ -929,7 +929,7 @@ void FileSelect_SetWindowContentVtx(GameState* thisx) { // x-coord (left) this->windowContentVtx[vtxId + 0].v.ob[0] = this->windowContentVtx[vtxId + 2].v.ob[0] = - D_80814280[*ptr] + posX; + D_80814280[spA4[i]] + posX; // x-coord (right) this->windowContentVtx[vtxId + 1].v.ob[0] = this->windowContentVtx[vtxId + 3].v.ob[0] = this->windowContentVtx[vtxId + 0].v.ob[0] + D_80814628[i]; diff --git a/mm/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c b/mm/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c index 005fc7eb9..a78d0de45 100644 --- a/mm/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c +++ b/mm/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c @@ -39,11 +39,13 @@ s16 D_80814280[] = { s16 D_80814304[] = { 1, 2, 0, 1, 1, 2, 1, 1, 4, 2, 2, 2, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 2, 4, 3, 2, 4, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 0, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, + 0 }; s16 D_80814384[] = { 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0 }; s16 D_80814404[] = { |
