1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Handle a lack of trailing newline in config file.

The configurator properly checks that the config data fits, so there is no risk of a command being cut off
This commit is contained in:
Kyle K 2019-09-24 08:06:39 +00:00
parent a54c33b952
commit b81b263bd0

View file

@ -6547,6 +6547,10 @@ bool cliProcessCustomDefaults(void)
processCharacter(*customDefaultsPtr++);
}
// Process a newline at the very end so that the last command gets executed,
// even when the file did not contain a trailing newline
processCharacter('\r');
processingCustomDefaults = false;
#if !defined(DEBUG_CUSTOM_DEFAULTS)
cliWriter = cliWriterTemp;