mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
Fix sequence buffer overrun
This commit is contained in:
parent
d3a669c3b0
commit
5a260a2840
1 changed files with 2 additions and 0 deletions
|
@ -2174,6 +2174,7 @@ void sequence_channel_process_script(struct SequenceChannel *seqChannel) {
|
||||||
loBits = cmd & 7;
|
loBits = cmd & 7;
|
||||||
switch (cmd & 0xf8) {
|
switch (cmd & 0xf8) {
|
||||||
case 0x80:
|
case 0x80:
|
||||||
|
if (loBits >= LAYERS_MAX) break;
|
||||||
if (seqChannel->layers[loBits] != NULL) {
|
if (seqChannel->layers[loBits] != NULL) {
|
||||||
value = seqChannel->layers[loBits]->finished;
|
value = seqChannel->layers[loBits]->finished;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2218,6 +2219,7 @@ void sequence_channel_process_script(struct SequenceChannel *seqChannel) {
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
case 0x00: // chan_testlayerfinished
|
case 0x00: // chan_testlayerfinished
|
||||||
|
if (loBits >= LAYERS_MAX) break;
|
||||||
if (seqChannel->layers[loBits] != NULL) {
|
if (seqChannel->layers[loBits] != NULL) {
|
||||||
value = seqChannel->layers[loBits]->finished;
|
value = seqChannel->layers[loBits]->finished;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue