2
0

lineSize needs to be > 1.

This commit is contained in:
Maarten Billemont 2016-11-06 10:42:23 -05:00
parent 2199757d9b
commit dd9e4eafbc

View File

@ -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;
}