mirror of
https://github.com/mysensors/MySensors.git
synced 2026-02-20 01:21:27 +01:00
Linux: Fix null ptr exception (#1025)
This commit is contained in:
@@ -83,7 +83,7 @@ LOCAL uint8_t RF24_spiMultiByteTransfer(const uint8_t cmd, uint8_t* buf, uint8_t
|
||||
} else {
|
||||
status = *prx++; // status is 1st byte of receive buffer
|
||||
// decrement before to skip status byte
|
||||
while (--size) {
|
||||
while (--size && (buf != NULL)) {
|
||||
*buf++ = *prx++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ LOCAL uint8_t RFM69_spiMultiByteTransfer(const uint8_t cmd, uint8_t* buf, uint8_
|
||||
} else {
|
||||
status = *prx++; // status is 1st byte of receive buffer
|
||||
// decrement before to skip status byte
|
||||
while (--size) {
|
||||
while (--size && (buf != NULL)) {
|
||||
*buf++ = *prx++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ LOCAL uint8_t RFM95_spiMultiByteTransfer(const uint8_t cmd, uint8_t* buf, uint8_
|
||||
} else {
|
||||
status = *prx++; // status is 1st byte of receive buffer
|
||||
// decrement before to skip status byte
|
||||
while (--size) {
|
||||
while (--size && (buf != NULL)) {
|
||||
*buf++ = *prx++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user