lineedit: in !EDITING config, return -1 on fgets error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
9371043698
commit
b2320370be
@ -2729,7 +2729,8 @@ int FAST_FUNC read_line_input(const char* prompt, char* command, int maxsize)
|
|||||||
{
|
{
|
||||||
fputs(prompt, stdout);
|
fputs(prompt, stdout);
|
||||||
fflush_all();
|
fflush_all();
|
||||||
fgets(command, maxsize, stdin);
|
if (!fgets(command, maxsize, stdin))
|
||||||
|
return -1;
|
||||||
return strlen(command);
|
return strlen(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user