]> git.droids-corp.org - protos/xbee-avr.git/commitdiff
xbee_recv: fix frame data pointer
authorFabrice Desclaux <serpilliere@droids-corp.org>
Mon, 20 Feb 2012 22:25:10 +0000 (23:25 +0100)
committerFabrice Desclaux <serpilliere@droids-corp.org>
Mon, 20 Feb 2012 22:25:10 +0000 (23:25 +0100)
main.c

diff --git a/main.c b/main.c
index f0174a2fdb54b6a6acc908552a9ed62541ac61ee..272090f12aa4ca5fa47a0b814789a7047e7ff10c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -231,7 +231,7 @@ int xbee_recv_data(struct xbee_recv_hdr *recvframe, unsigned len)
                        break;
                case RC_PROTO_TYPE_RANGE: {
                        struct rc_proto_range *rcr =
-                               (struct rc_proto_range *) recvframe;
+                               (struct rc_proto_range *) recvframe->data;
 
                        if (datalen != sizeof(struct rc_proto_range))
                                return -1;