From bb65c9fc09f444cdf728ee2b43d03a2f31bc1015 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 7 Dec 2009 19:48:08 +0000 Subject: [PATCH] fix off-by-one where a mere click would select the first item inside a menu from Thomas Pfaff ok oga@ --- app/cwm/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cwm/menu.c b/app/cwm/menu.c index 83be09bbf..2d02a645f 100644 --- a/app/cwm/menu.c +++ b/app/cwm/menu.c @@ -398,7 +398,7 @@ menu_calc_entry(struct screen_ctx *sc, struct menu_ctx *mc, int x, int y) entry = y / font_height(); /* in bounds? */ - if (x < 0 || x > mc->width || y < 0 || y > font_height() * mc->num || + if (x <= 0 || x > mc->width || y <= 0 || y > font_height() * mc->num || entry < 0 || entry >= mc->num) entry = -1;