summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-27 16:02:27 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-27 16:02:27 +0100
commit8c18d579ef6457435562fe88051eb0c93f86cd17 (patch)
tree3432c13b6ad9a884353e7ad9b8f1be5654235059 /interface.c
parent9f713366dd2c1cb1375b38f140347da423eb9153 (diff)
downloadvdr-8c18d579ef6457435562fe88051eb0c93f86cd17.tar.gz
vdr-8c18d579ef6457435562fe88051eb0c93f86cd17.tar.bz2
Fixed a crash when learning the keys of several remote controls1.1.14
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/interface.c b/interface.c
index 0f4b6151..a9f0d9a9 100644
--- a/interface.c
+++ b/interface.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: interface.c 1.58 2002/10/26 12:22:18 kls Exp $
+ * $Id: interface.c 1.59 2002/10/27 15:54:05 kls Exp $
*/
#include "interface.h"
@@ -352,12 +352,12 @@ void cInterface::QueryKeys(cRemote *Remote)
char *NewCode = NULL;
eKeys Key = cRemote::Get(100, &NewCode);
switch (Key) {
- case kUp: {
- NewKey = eKeys(NewKey - 1);
- cKey *last = Keys.Last();
- if (last && last->Key() == NewKey)
- Keys.Del(last);
- }
+ case kUp: if (NewKey > kUp) {
+ NewKey = eKeys(NewKey - 1);
+ cKey *last = Keys.Last();
+ if (last && last->Key() == NewKey)
+ Keys.Del(last);
+ }
break;
case kDown: WriteText(1, 5, tr("Press 'Up' to confirm"));
WriteText(1, 6, tr("Press 'Down' to continue"));