summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-06-01 11:45:52 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2009-06-01 11:45:52 +0200
commit6f912d247fdb4f16c99e6e974f5a4d0b59dfd80f (patch)
tree52cd2db826c7ac2c19048c0c10726f78ece26663 /dvbdevice.c
parentbad922e955e9109de08223dc74bb7221c61d595e (diff)
downloadvdr-6f912d247fdb4f16c99e6e974f5a4d0b59dfd80f.tar.gz
vdr-6f912d247fdb4f16c99e6e974f5a4d0b59dfd80f.tar.bz2
Fixed handling the length of DiSEqC command sequences
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index f8e176fc..a57693e4 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 2.18 2009/05/15 11:08:18 kls Exp $
+ * $Id: dvbdevice.c 2.19 2009/06/01 11:42:06 kls Exp $
*/
#include "dvbdevice.h"
@@ -232,8 +232,8 @@ bool cDvbTuner::SetFrontend(void)
uchar *codes = diseqc->Codes(n);
if (codes) {
struct dvb_diseqc_master_cmd cmd;
- memcpy(cmd.msg, codes, min(n, int(sizeof(cmd.msg))));
- cmd.msg_len = n;
+ cmd.msg_len = min(n, int(sizeof(cmd.msg)));
+ memcpy(cmd.msg, codes, cmd.msg_len);
CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &cmd));
}
}