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

Lower max CraftName length to avoid inadvertent data loss

This commit is contained in:
howels 2022-08-16 12:17:56 +01:00
parent 60fe04a885
commit 07f882aed1

View file

@ -1469,7 +1469,7 @@ static void osdElementWarnings(osdElementParms_t *element)
} }
#endif // USE_RX_LINK_QUALITY_INFO #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 #endif // USE_CRAFTNAME_MSGS
} }