shithub: battleship

Download patch

ref: 6389f8dbca36ddc1ca4028fdb404d63eb404357f
parent: a6de25225e1f8958e9efab47ecd1134263d661b3
author: rodri <rgl@antares-labs.eu>
date: Sun Oct 1 08:19:54 EDT 2023

get the condition right.

--- a/menulist.c
+++ b/menulist.c
@@ -74,7 +74,7 @@
 	if(ml->nentries < 1)
 		return -1;
 
-	r = ml->nentries < Maxvisitems? ml->r: Rpt(ml->sr.min, ml->r.max);
+	r = ml->nentries > Maxvisitems? Rpt(ml->sr.min, ml->r.max): ml->r;
 
 	selected = -1;
 	if(ptinrect(mc->xy, r)){