1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Review comment fixes

This commit is contained in:
phobos- 2022-08-28 15:14:23 +02:00
parent 185a94384c
commit fb2afd4c5b
6 changed files with 10 additions and 10 deletions

View file

@ -252,7 +252,7 @@ void receiveMspData(const uint8_t packageIndex, const volatile uint8_t* const re
mspCurrentPackage++;
}
if (acceptData) {
if (acceptData && (receiveData != NULL)) {
uint8_t len = MIN((uint8_t)(mspLength - mspCurrentOffset), ELRS_MSP_BYTES_PER_CALL);
memcpy(&mspData[mspCurrentOffset], (const uint8_t*) receiveData, len);
mspCurrentOffset += len;