diff options
author | okan | 2009-12-07 19:48:08 +0000 |
---|---|---|
committer | okan | 2009-12-07 19:48:08 +0000 |
commit | c88913a1665e6a67ca9af2d168494a3ff8877294 (patch) | |
tree | 4dbb91b40b6bae1d2738c6c320da1bdfe0160e27 /menu.c | |
parent | a599addca72a7f29a64072c67ba48abed5b5561e (diff) | |
download | cwm-c88913a1665e6a67ca9af2d168494a3ff8877294.tar.gz |
fix off-by-one where a mere click would select the first item inside a menu
from Thomas Pfaff
ok oga@
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |