Skip to content

Commit ef5725b

Browse files
committed
Fix white space in new lines that just has \n.
1 parent 0a4a028 commit ef5725b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

SUSTerm/mainwindow.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,12 @@ void MainWindow::SerialReceive(void)
393393
if(i < lines.size()-1)
394394
{
395395
to_print_ascii = to_print_ascii.append(qba_eol);
396-
to_print_hex = to_print_hex.append(" 0A" + qba_eol);
396+
397+
// If this line has any data after "[<TIME>] " add a white space before "0A\n"
398+
if(to_print_hex.size() > qba_time.size())
399+
to_print_hex = to_print_hex.append(" 0A" + qba_eol);
400+
else
401+
to_print_hex = to_print_hex.append("0A" + qba_eol);
397402
}
398403
else
399404
{

0 commit comments

Comments
 (0)