sysparam editor: accept newline to end a line of input.

This commit is contained in:
Our Air Quality 2017-08-07 22:38:05 +10:00
parent 5aabd643da
commit b79da1f1f1

View file

@ -45,7 +45,7 @@ size_t tty_readline(char *buffer, size_t buf_size, bool echo) {
while (true) {
c = getchar();
if (c == '\r') {
if (c == '\r' || c == '\n') {
if (echo) putchar('\n');
break;
} else if (c == '\b' || c == 0x7f) {