commit | 707fa6d28918283dc74b5b7cfb66d4dc431efc9a | [log] [tgz] |
---|---|---|
author | Koushik K. Dutta <koushd@gmail.com> | Tue Mar 23 11:44:33 2010 -0700 |
committer | Koushik K. Dutta <koushd@gmail.com> | Tue Mar 23 11:44:33 2010 -0700 |
tree | 91618c6dc8590711f4f9cfe8e16622dbd0fb652b | |
parent | 581bd861d18c60d244c88fea3fa62296f9aefd30 [diff] [blame] |
null terminate script. wrapping menus. 1.7.7
diff --git a/ui.c b/ui.c index e704d05..5ea4e42 100644 --- a/ui.c +++ b/ui.c
@@ -522,8 +522,8 @@ old_sel = menu_sel; menu_sel = sel; - if (menu_sel < 0) menu_sel = 0; - if (menu_sel >= menu_items) menu_sel = menu_items-1; + if (menu_sel < 0) menu_sel = menu_items + menu_sel; + if (menu_sel >= menu_items) menu_sel = menu_sel - menu_items; if (menu_sel < menu_show_start && menu_show_start > 0) {