From ccb035ab284dcce968d948a5f04eef96c9cc541d Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 24 Oct 2009 09:08:26 +0000 Subject: Enable Halibut to read a .but file from standard input, by supplying the special filename '-'. [originally from svn r8728] --- error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'error.c') 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 : ""); if (fpos.line > 0) fprintf(stderr, "%d:", fpos.line); if (fpos.col > 0) -- cgit v1.1