summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-08 17:17:20 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-08 17:17:20 +0100
commitdf65f4a2f142fa6759d88cdca125ddef63ade65a (patch)
tree769939da7097cdc923b2aba2a9f168aa2969e6a2 /remote.c
parent227034f8e6f53360a29385e4577c58af050fa675 (diff)
downloadvdr-df65f4a2f142fa6759d88cdca125ddef63ade65a.tar.gz
vdr-df65f4a2f142fa6759d88cdca125ddef63ade65a.tar.bz2
Fixed handling "more than 3 byte" key sequences in cKbdRemote::ReadKeySequence()
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/remote.c b/remote.c
index a59ecfe8..73f96dda 100644
--- a/remote.c
+++ b/remote.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remote.c 1.46 2006/01/01 14:21:07 kls Exp $
+ * $Id: remote.c 1.47 2006/01/08 17:13:18 kls Exp $
*/
#include "remote.h"
@@ -301,12 +301,12 @@ uint64 cKbdRemote::ReadKeySequence(void)
k |= key1 & 0xFF;
switch (key1) {
case 0x31 ... 0x3F: // more-byte sequence
- while (key1 != 0x7E) {
- k <<= 8;
- k |= key1 & 0xFF;
- if ((key1 = ReadKey()) < 0)
- break; // Sequence ends here
- }
+ do {
+ if ((key1 = ReadKey()) < 0)
+ break; // Sequence ends here
+ k <<= 8;
+ k |= key1 & 0xFF;
+ } while (key1 != 0x7E);
break;
}
}