Commit f691c45a authored by TMRh20's avatar TMRh20

Fix issue #101 found by @mz-fuzzy

Fix over reading a buffer by 1 byte

https://github.com/TMRh20/RF24/issues/101
parent dceeabb3
......@@ -266,7 +266,7 @@ uint8_t RF24::read_payload(void* buf, uint8_t data_len)
size = data_len + blank_len + 1; // Add register value to transmit buffer
*ptx++ = R_RX_PAYLOAD;
while(size--)
while(--size)
*ptx++ = NOP;
size = data_len + blank_len + 1; // Size has been lost during while, re affect
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment