shithub: ft2-clone

Download patch

ref: 9bbd17fed5701c6ef6264b1fa84c1098d7918ffa
parent: bdb13798b72846946da8baa6ef6a0b67944e8c02
author: Olav Sørensen <[email protected]>
date: Sun Nov 22 13:49:31 EST 2020

Fixed potential setPos() bug

--- a/src/ft2_replayer.c
+++ b/src/ft2_replayer.c
@@ -2269,7 +2269,7 @@
 		if (song.len > 0 && song.songPos >= song.len)
 			song.songPos = song.len - 1;
 
-		song.pattNr = song.songTab[songPos];
+		song.pattNr = song.songTab[song.songPos];
 		assert(song.pattNr < MAX_PATTERNS);
 		song.pattLen = pattLens[song.pattNr];