mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Fix lack of NULL setting for the last musicdef in the list's sequence.next
This commit is contained in:
parent
b6e2609873
commit
d9fd0eda2e
1 changed files with 10 additions and 1 deletions
|
|
@ -1492,7 +1492,16 @@ void S_PopulateSoundTestSequence(void)
|
||||||
S_InsertMapIntoSoundTestSequence(i, &tail);
|
S_InsertMapIntoSoundTestSequence(i, &tail);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, we insert all important musicdefs at the head,
|
// Okay, guarantee the list ends on NULL! This stops
|
||||||
|
// that pointing to either invalid memory in general,
|
||||||
|
// or valid memory that is already somewhere else in
|
||||||
|
// the sound test sequence (way more likely).
|
||||||
|
// (We do this here so that inserting unimportant,
|
||||||
|
// mapless musicdefs does not get overwritten, like it
|
||||||
|
// would be if this were done after the below block.)
|
||||||
|
*tail = NULL;
|
||||||
|
|
||||||
|
// Finally, we insert all important musicdefs at the head,
|
||||||
// and all others at the tail.
|
// and all others at the tail.
|
||||||
// It's being added to the sequence in reverse order...
|
// It's being added to the sequence in reverse order...
|
||||||
// but because musicdefstart is ALSO populated in reverse,
|
// but because musicdefstart is ALSO populated in reverse,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue