diff --git a/examples/sysparam_editor/sysparam_editor.c b/examples/sysparam_editor/sysparam_editor.c index f3f767b..29bf78e 100644 --- a/examples/sysparam_editor/sysparam_editor.c +++ b/examples/sysparam_editor/sysparam_editor.c @@ -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) {