Skip to content

Commit

Permalink
Linux: Fix null ptr exception (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
tekka007 authored and henrikekblad committed Jan 7, 2018
1 parent b51c77b commit 6434d2f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/RF24/RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/RFM69/new/RFM69_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/RFM95/RFM95.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down

0 comments on commit 6434d2f

Please sign in to comment.