summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 12f4c995..ebf08a4c 100644
--- a/main.c
+++ b/main.c
@@ -985,7 +985,8 @@ mmsg(enum mandocerr t, enum mandoclevel lvl,
{
const char *mparse_msg;
- fprintf(stderr, "%s: %s:", getprogname(), file);
+ fprintf(stderr, "%s: %s:", getprogname(),
+ file == NULL ? "<stdin>" : file);
if (line)
fprintf(stderr, "%d:%d:", line, col + 1);