utils: test for EOF on error, not for \0.
This commit is contained in:
parent
9dfed6fc0c
commit
1eeaa99438
@ -48,7 +48,7 @@ question(bool preset, const char *fmt, va_list ap)
|
||||
else
|
||||
fputs(" [y/N] ", stderr);
|
||||
|
||||
if ((response = fgetc(stdin))) {
|
||||
if ((response = fgetc(stdin)) != EOF) {
|
||||
if (response == '\n')
|
||||
return preset;
|
||||
if (response == 'y' || response == 'Y')
|
||||
|
Loading…
Reference in New Issue
Block a user