summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 7897d7a..00d007d 100644
--- a/error.c
+++ b/error.c
@@ -393,7 +393,7 @@ static void do_error(int code, va_list ap) {
if (flags & PREFIX)
fputs("halibut: ", stderr);
if (flags & FILEPOS) {
- fprintf(stderr, "%s:", fpos.filename);
+ fprintf(stderr, "%s:", fpos.filename ? fpos.filename : "<standard input>");
if (fpos.line > 0)
fprintf(stderr, "%d:", fpos.line);
if (fpos.col > 0)