mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Handle a lack of trailing newline in config file. (#8942)
Handle a lack of trailing newline in config file.
This commit is contained in:
commit
462699d1a5
1 changed files with 4 additions and 0 deletions
|
@ -6566,6 +6566,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue