From d82d0f7e46966107dc432dba21933c55f97ad535 Mon Sep 17 00:00:00 2001 From: tuxphone <67556506+tuxphone@users.noreply.github.com> Date: Sat, 19 Sep 2020 15:06:50 +0200 Subject: [PATCH] Update main.cpp --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 0502d41..18875c7 100644 --- a/main.cpp +++ b/main.cpp @@ -155,7 +155,7 @@ void OnTxTimeout( void ) void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) { ( size > BUFFER_SIZE ) ? rxSize = BUFFER_SIZE : rxSize = size; - memcpy( mPacket, payload, size ); + memcpy( mPacket, payload, rxSize ); Radio.Sleep(); uint32_t packetID = (uint32_t)mPacket[11]<<24 | (uint32_t)mPacket[10]<<16 | (uint32_t)mPacket[9]<<8 | (uint32_t)mPacket[8];