1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

Merge pull request #11801 from howels/MSP_CRAFTNAME-lengthfix

Lower max CraftName length to avoid ugly truncation errors
This commit is contained in:
haslinghuis 2022-08-22 20:45:24 +02:00 committed by GitHub
commit c8a6f2a60c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1469,7 +1469,7 @@ static void osdElementWarnings(osdElementParms_t *element)
}
#endif // USE_RX_LINK_QUALITY_INFO
}
strncpy(pilotConfigMutable()->name, element->buff, MAX_NAME_LENGTH);
strncpy(pilotConfigMutable()->name, element->buff, MAX_NAME_LENGTH - 1);
}
#endif // USE_CRAFTNAME_MSGS
}