summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/setup.c b/src/setup.c
index e4c22f3..6b8677f 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -98,6 +98,10 @@ int setup_interactively(til_settings_t *settings, int (*setup_func)(til_settings
if (!defaults) {
fflush(stdout);
+
+ if (feof(stdin))
+ return -EIO;
+
fgets(buf, sizeof(buf), stdin);
}
© All Rights Reserved