aboutsummaryrefslogtreecommitdiff
path: root/menulist.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-10-01 12:19:54 +0000
committerrodri <rgl@antares-labs.eu>2023-10-01 12:19:54 +0000
commit6389f8dbca36ddc1ca4028fdb404d63eb404357f (patch)
treefec03c7ae59978c1da374c1a6d5786b73f0e2a6d /menulist.c
parenta6de25225e1f8958e9efab47ecd1134263d661b3 (diff)
downloadbattleship-6389f8dbca36ddc1ca4028fdb404d63eb404357f.tar.gz
battleship-6389f8dbca36ddc1ca4028fdb404d63eb404357f.tar.bz2
battleship-6389f8dbca36ddc1ca4028fdb404d63eb404357f.zip
get the condition right.
Diffstat (limited to 'menulist.c')
-rw-r--r--menulist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/menulist.c b/menulist.c
index 90eaa31..ea7e4b8 100644
--- a/menulist.c
+++ b/menulist.c
@@ -74,7 +74,7 @@ menulist_update(Menulist *ml, Mousectl *mc, Channel *drawchan)
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)){