mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 00:50:50 +00:00
Remove trailing newline in interactive mode.
This commit is contained in:
parent
6cf5882c56
commit
e3c7f0027f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user