shithub: zuke

Download patch

ref: 5fcaa204668e90a0ca9e150a14bd30417e53ca23
parent: af78af162bb2b70380349fd166e2308114ef7a9b
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Fri Aug 21 08:51:58 EDT 2020

fix crash when middle-clicking outside of the track list

--- a/zuke.c
+++ b/zuke.c
@@ -991,8 +991,9 @@
 				scroll = CLAMP(scroll, 0, plnum-scrollsz-1);
 				redraw(1);
 			}else if(m.buttons == 1 || m.buttons == 2){
-				pcur = scroll + n;
-				if(m.buttons == 2){
+				n += scroll;
+				if(m.buttons == 2 && n < plnum){
+					pcur = n;
 					stop(playercurr);
 					playercurr = newplayer(pcur, 1);
 					start(playercurr);