Files
Shipwright/soh
David Racine 27b71b1a54 Drop the seqLoadStatus bounds checks made redundant by #6932 (#7100)
#6917 guarded the three seqLoadStatus accessors against sequenceMapSize
because the array was allocated at exactly that size, so a custom sequence
id past it read and wrote off the end.

#6932 sized the array to sequenceMapSize + 0xF to match sequenceMap, which
covers the whole id space rather than rejecting the ids outside it, and also
protects the writers those guards never saw: AudioHeap_AllocCached and
AudioHeap_PopCache index seqLoadStatus directly.

The guards are now not just redundant but bounded wrong - they treat the ids
in [sequenceMapSize, sequenceMapSize + 0xF) as absent from a table that now
has room for them. Nothing breaks today because every entry starts at 5, so
AudioLoad_IsSeqLoadComplete answers true regardless and
AudioLoad_SetSeqLoadStatus already declines to overwrite a 5 - but once the
heap cache path moves such an entry off 5, the guard blocks an update that
should happen.

Reverting them restores the three functions to their decompiled form. The
sizing from #6932 and the id check in AudioLoad_SyncInitSeqPlayerInternal
remain the actual protection.
2026-08-22 14:19:04 +00:00
..
2024-02-01 23:11:31 -06:00
2025-02-04 10:48:41 +01:00
2024-10-31 07:42:27 -07:00
2022-07-14 20:47:48 -04:00
2022-07-25 21:11:53 -04:00
2025-04-01 22:33:38 -04:00