summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorPhilip Dubé <159546+serprex@users.noreply.github.com>2026-10-13 13:36:27 +0000
committerGitHub <noreply@github.com>2026-10-13 13:36:27 +0000
commite65fa741db8a85797a2b822bd925fb606b20a16e (patch)
treeaf91c5e92e3a32030c71b2030d19b411b012fe0a /soh/src/code
parent8ccdbb98a0b5bbb89bb67bf62e4219acdac6457b (diff)
Fix OOB check in audio_seqplayer.c (#7387)
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/audio_seqplayer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/soh/src/code/audio_seqplayer.c b/soh/src/code/audio_seqplayer.c
index 92efecd02..b3bfdc571 100644
--- a/soh/src/code/audio_seqplayer.c
+++ b/soh/src/code/audio_seqplayer.c
@@ -1186,12 +1186,12 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
u16 seqId = AudioEditor_GetReplacementSeq(seqPlayer->seqId);
SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[seqId]);
- // The game apparantely would sometimes do negative array lookups, the result of which would
+ // The game apparently would sometimes do negative array lookups, the result of which would
// get rejected by AudioHeap_SearchCaches, never changing the actual fontid.
- if (result > sDat.numFonts)
+ if (result >= sDat.numFonts)
break;
- fontId = sDat.fonts[(sDat.numFonts - result - 1)];
+ fontId = sDat.fonts[sDat.numFonts - result - 1];
}
if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, fontId)) {