Open tedhenry100 opened 7 years ago
The reason for the following line is presumably to avoid reading off the end of packetbuffer.
packetbuffer
if (replyidx >= 20) break;
https://github.com/adafruit/Adafruit_BluefruitLE_nRF51/blob/b80b880a62646223ba28b93301164c2134c9f4fc/examples/cplay_neopixel_picker/packetParser.cpp#L83
In the case that the value of READ_BUFSIZE definition higher in the file is changed to a smaller number, the line would be safer and better if written as
READ_BUFSIZE
if (replyidx >= READ_BUFSIZE) break;
The reason for the following line is presumably to avoid reading off the end of
packetbuffer
.if (replyidx >= 20) break;
https://github.com/adafruit/Adafruit_BluefruitLE_nRF51/blob/b80b880a62646223ba28b93301164c2134c9f4fc/examples/cplay_neopixel_picker/packetParser.cpp#L83
In the case that the value of
READ_BUFSIZE
definition higher in the file is changed to a smaller number, the line would be safer and better if written asif (replyidx >= READ_BUFSIZE) break;