summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-18 12:47:01 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-18 12:47:01 +0100
commit53f77dddedba4fd2d0322dbb7de8df1fbc480790 (patch)
treeae4b09b966560884925244ba7fbf0748316add48 /menu.c
parent273d6c53a68566f31f4241bf094416956bde9562 (diff)
downloadvdr-53f77dddedba4fd2d0322dbb7de8df1fbc480790.tar.gz
vdr-53f77dddedba4fd2d0322dbb7de8df1fbc480790.tar.bz2
Now resetting the channel number if the number entered through the numeric keys exceeds the maximum channel number
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 6202aa89..6690521b 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.411 2006/02/17 15:38:46 kls Exp $
+ * $Id: menu.c 1.412 2006/02/18 12:42:24 kls Exp $
*/
#include "menu.h"
@@ -3105,7 +3105,10 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
}
case k1 ... k9:
if (number >= 0) {
- number = number * 10 + Key - k0;
+ if (number > Channels.MaxNumber())
+ number = Key - k0;
+ else
+ number = number * 10 + Key - k0;
channel = Channels.GetByNumber(number);
displayChannel->SetEvents(NULL, NULL);
withInfo = false;