terminal: fix signed overflow warning
This commit is contained in:
parent
204458145e
commit
77ea70aa3a
|
@ -149,7 +149,7 @@ static void terminal_process_escape(void)
|
|||
break;
|
||||
}
|
||||
uint16_t terminal_line_new = 0; // new line start
|
||||
for (uint16_t pos = 0; pos < terminal_line - 1 && pos < LENGTH(terminal_buffer); pos++) { // find for the last line before the current
|
||||
for (uint16_t pos = 0; pos + 1 < terminal_line && pos < LENGTH(terminal_buffer); pos++) { // find for the last line before the current
|
||||
if ('\0' == terminal_buffer[pos]) { // new line found
|
||||
terminal_line_new = pos + 1; // save new line
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue