aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/calculer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/calculer.c b/src/calculer.c
index 0c9fe8b..2d6c973 100644
--- a/src/calculer.c
+++ b/src/calculer.c
@@ -81,7 +81,7 @@ main(void)
sprintf(prompt, "%d + %d = ", x, y);
input = linenoise(prompt);
- if (strcmp(input, "q") == 0)
+ if ((!input) || (*input == '\0'))
{
free(input);
fclose(logfile);