Terminate last line from the SD card even if it doesn't have a \n
This commit is contained in:
parent
ff56ece6f8
commit
fdbbc7d62a
1 changed files with 3 additions and 2 deletions
|
@ -582,8 +582,6 @@ void get_command()
|
||||||
((serial_char == '#' || serial_char == ':') && comment_mode == false) ||
|
((serial_char == '#' || serial_char == ':') && comment_mode == false) ||
|
||||||
serial_count >= (MAX_CMD_SIZE - 1) || n==-1)
|
serial_count >= (MAX_CMD_SIZE - 1) || n==-1)
|
||||||
{
|
{
|
||||||
if(card.eof()) break;
|
|
||||||
|
|
||||||
if(serial_char=='#')
|
if(serial_char=='#')
|
||||||
stop_buffering=true;
|
stop_buffering=true;
|
||||||
|
|
||||||
|
@ -631,6 +629,9 @@ void get_command()
|
||||||
|
|
||||||
comment_mode = false; //for new command
|
comment_mode = false; //for new command
|
||||||
serial_count = 0; //clear buffer
|
serial_count = 0; //clear buffer
|
||||||
|
|
||||||
|
if(card.eof()) break;
|
||||||
|
|
||||||
// The following line will reserve buffer space if available.
|
// The following line will reserve buffer space if available.
|
||||||
if (! cmdqueue_could_enqueue_back(MAX_CMD_SIZE-1, true))
|
if (! cmdqueue_could_enqueue_back(MAX_CMD_SIZE-1, true))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue