diff options
Diffstat (limited to 'executor.c')
| -rw-r--r-- | executor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/executor.c b/executor.c index 993870a..0542a9c 100644 --- a/executor.c +++ b/executor.c @@ -220,7 +220,7 @@ enum cccl_ExecutorStatus cccl_execute(struct cccl_Node *code, struct cccl_Variab errx(1, "Cannot save input in a non-existent variable %c", code->value); int c = getchar(); - if (c < 0) + if (c < 0 && ferror(stdin)) err(1, "getchar()"); *p = c; |