shithub: wipeout

Download patch

ref: b484e85e7e40144b31eb329965dd603b0c931889
parent: f29463132baa9d1fcb5c7febac42675d469b63bf
author: Dominic Szablewski <dominic@phoboslab.org>
date: Sun Aug 13 18:12:29 EDT 2023

Fix music decoder playing garbage; close #8

--- a/src/wipeout/sfx.c
+++ b/src/wipeout/sfx.c
@@ -285,8 +285,9 @@
 }
 
 void sfx_music_play(uint32_t index) {
-	error_if(index > len(def.music), "Invalid music index");
+	error_if(index >= len(def.music), "Invalid music index");
 	if (index == music->track_index) {
+		sfx_music_rewind();
 		return;
 	}