diff options
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r-- | libbb/lineedit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 65dffe56d..8a276d941 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -2754,7 +2754,8 @@ int FAST_FUNC read_line_input(const char* prompt, char* command, int maxsize) | |||
2754 | { | 2754 | { |
2755 | fputs(prompt, stdout); | 2755 | fputs(prompt, stdout); |
2756 | fflush_all(); | 2756 | fflush_all(); |
2757 | fgets(command, maxsize, stdin); | 2757 | if (!fgets(command, maxsize, stdin)) |
2758 | return -1; | ||
2758 | return strlen(command); | 2759 | return strlen(command); |
2759 | } | 2760 | } |
2760 | 2761 | ||