summaryrefslogtreecommitdiff
path: root/osdbase.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-06-17 14:25:08 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-06-17 14:25:08 +0200
commit80a7ef5a55eb5e594af018077630c5aa892ccc19 (patch)
tree9d8101a55b3f77f1a81968f66555651633962407 /osdbase.c
parent0eb9abbf12fc1c3e4abbc369b75a7528d671a557 (diff)
downloadvdr-80a7ef5a55eb5e594af018077630c5aa892ccc19.tar.gz
vdr-80a7ef5a55eb5e594af018077630c5aa892ccc19.tar.bz2
Fixed handling 'page down', which was broken in version 1.3.26
Diffstat (limited to 'osdbase.c')
-rw-r--r--osdbase.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/osdbase.c b/osdbase.c
index 7d03dbd0..b27b1df2 100644
--- a/osdbase.c
+++ b/osdbase.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osdbase.c 1.17 2005/06/12 10:44:22 kls Exp $
+ * $Id: osdbase.c 1.18 2005/06/17 14:22:34 kls Exp $
*/
#include "osdbase.h"
@@ -350,6 +350,10 @@ void cOsdMenu::PageDown(void)
current += displayMenuItems;
first += displayMenuItems;
int last = Count() - 1;
+ if (current > last)
+ current = last;
+ if (first + displayMenuItems > last)
+ first = max(0, last - displayMenuItems + 1);
int tmpCurrent = current;
while (!SelectableItem(tmpCurrent) && ++tmpCurrent <= last)
;