summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 1d8e8ba0..d908a8fe 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -47,7 +47,7 @@
errno = 0; \
clearerr(yyin); \
} \
- if (result > 1) { \
+ if (result > 1 && !feof(yyin)) { \
while (result > 1 && \
(buf[result - 1] != '\n' && buf[result - 1] != ' ')) \
result--, n++; \