Skip to content

Commit

Permalink
Fix peek per #78 & #80
Browse files Browse the repository at this point in the history
Use memcpy instead of pointer for peek
  • Loading branch information
TMRh20 committed Mar 20, 2016
1 parent 18a0a2e commit 09a9ccf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion RF24Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,9 @@ uint16_t RF24Network::peek(RF24NetworkHeader& header)
#else
RF24NetworkFrame *frame = (RF24NetworkFrame*)(frame_queue);
memcpy(&header,&frame->header,sizeof(RF24NetworkHeader));
return frame->message_size;
uint16_t msg_size;
memcpy(&msg_size,frame+8,2);
return msg_size;
#endif
}
return 0;
Expand Down

0 comments on commit 09a9ccf

Please sign in to comment.