[jak2] Fix overlord related crash (#2834)

This fixes the crash reported in
https://github.com/open-goal/jak-project/issues/2833

There was a memory bug here for a long time where our array of `VagCmd`
in `iso_queue.cpp` was too small. This caused GetVagCommand to return
bogus pointers, and sound code would write over other parts of memory.
This commit is contained in:
water111
2023-07-21 11:25:08 -04:00
committed by GitHub
parent ec6b191334
commit 5165a828a5
+5 -1
View File
@@ -33,8 +33,12 @@ u32 NextBuffer = 0;
u32 AllocdStrBuffersCount = 0;
u32 NextStrBuffer = 0;
int sSema = 0;
// note that these are different vag commands from the VagCmds array.
// These are used for the return values of GetVagCommand, and are used for queued commands.
// The VagCmds array is used for commands that are actually running.
u32 vag_cmd_cnt = 0;
VagCmd vag_cmds[N_VAG_CMDS];
VagCmd vag_cmds[32];
u32 vag_cmd_used = 0;
u32 max_vag_cmd_cnt = 0;