Remove trailing newline in interactive mode.

上级 6cf5882c
......@@ -439,7 +439,10 @@ static char *prompt(char *line, int size) {
retval = fgets(line, size, stdin);
} while (retval && *line == '\n');
line[strlen(line) - 1] = '\0';
fpurge(stdin);
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册