summaryrefslogtreecommitdiff
path: root/diseqc.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-08-06 10:45:05 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-08-06 10:45:05 +0200
commit5cfd39dfca50a8585e7fa9a729e996bbcfac78e7 (patch)
tree755b77caad1fd4fd32f0c1398a0df51c885ba922 /diseqc.c
parent69aa850d1e1ac9d20a028723da1fd2125ce40654 (diff)
downloadvdr-5cfd39dfca50a8585e7fa9a729e996bbcfac78e7.tar.gz
vdr-5cfd39dfca50a8585e7fa9a729e996bbcfac78e7.tar.bz2
Fixed handling DiSEqC codes
Diffstat (limited to 'diseqc.c')
-rw-r--r--diseqc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diseqc.c b/diseqc.c
index b65d82c6..d4462997 100644
--- a/diseqc.c
+++ b/diseqc.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: diseqc.c 2.4 2011/05/22 10:36:12 kls Exp $
+ * $Id: diseqc.c 2.5 2011/08/06 10:32:18 kls Exp $
*/
#include "diseqc.h"
@@ -95,13 +95,13 @@ const char *cDiseqc::Codes(const char *s) const
if (e) {
int NumCodes = 0;
const char *t = s;
- char *p;
while (t < e) {
if (NumCodes < MaxDiseqcCodes) {
errno = 0;
+ char *p;
int n = strtol(t, &p, 16);
if (!errno && p != t && 0 <= n && n <= 255) {
- if (parsing) {
+ if (!parsing) {
codes[NumCodes++] = uchar(n);
numCodes = NumCodes;
}