From 8c3e14e4eb2604046ff2b10ebdcc8a7b8381490e Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Mon, 20 Feb 2012 21:33:53 +0100 Subject: [PATCH] xbee_recv: fix data pointer --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index b6014db..24fba69 100644 --- a/main.c +++ b/main.c @@ -219,7 +219,7 @@ static int dump_atcmd(struct xbee_ctx *ctx, struct xbee_atresp_hdr *frame, int xbee_recv_data(struct xbee_recv_hdr *recvframe, unsigned len) { int datalen = len - sizeof(*recvframe); - struct rc_proto_hdr *rch = (struct rc_proto_hdr *) recvframe; + struct rc_proto_hdr *rch = (struct rc_proto_hdr *) &recvframe->data; if (datalen < sizeof(struct rc_proto_hdr)) return -1; -- 2.39.5