summaryrefslogtreecommitdiff
path: root/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'err.c')
-rw-r--r--err.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/err.c b/err.c
index 11a4863..a92a143 100644
--- a/err.c
+++ b/err.c
@@ -86,7 +86,7 @@ static void err_print_location_text(Location where) {
end = strchr(text, '\0');
assert(end);
err_fprint("\there: --> ");
- if (!has_newline)
+ if (!text[0])
err_fprint("<end of file>");
else
err_fwrite(text, 1, (size_t)(end - text));