diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-02-16 00:13:50 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-02-16 00:13:50 -0800 |
commit | d3ed8cb31a485cb4263cd22ca5f60c73b6166752 (patch) | |
tree | 82572ef2a248b80e54523c9df6d94aafeb63eed5 /com32/menu/menumain.c | |
parent | c9cddae667ebea9bdeba68db49c0e3230e85f9d4 (diff) | |
download | syslinux-d3ed8cb31a485cb4263cd22ca5f60c73b6166752.tar.gz |
If we're showing a scrollbar, always show at least one unit
In the simple menu system, if we're showing a scrollbar at all, always
show at least one unit of it.
Diffstat (limited to 'com32/menu/menumain.c')
-rw-r--r-- | com32/menu/menumain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index ff013286..4dbc66c3 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -415,7 +415,7 @@ draw_menu(int sel, int top, int edit_line) if ( nentries > MENU_ROWS ) { int sblen = MENU_ROWS*MENU_ROWS/nentries; sbtop = (MENU_ROWS-sblen+1)*top/(nentries-MENU_ROWS+1); - sbbot = sbtop + sblen - 1; + sbbot = max(sbtop, sbtop+sblen-1); sbtop += 4; sbbot += 4; /* Starting row of scrollbar */ } |