From dd9e4eafbca859e78c4ae00449a289cb7eedc5d5 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 6 Nov 2016 10:42:23 -0500 Subject: [PATCH] lineSize needs to be > 1. --- MasterPassword/C/mpw-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MasterPassword/C/mpw-cli.c b/MasterPassword/C/mpw-cli.c index ccd8d77a..63738fc4 100644 --- a/MasterPassword/C/mpw-cli.c +++ b/MasterPassword/C/mpw-cli.c @@ -85,7 +85,7 @@ static char *getline_prompt(const char *prompt) { ssize_t lineSize; fprintf( stderr, "%s", prompt ); fprintf( stderr, " " ); - if ((lineSize = getline( &buf, &bufSize, stdin )) < 0) { + if ((lineSize = getline( &buf, &bufSize, stdin )) <= 1) { free( buf ); return NULL; }