diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -411,14 +411,17 @@ static void mmsg(enum mandocerr t, enum mandoclevel lvl, const char *file, int line, int col, const char *msg) { + const char *mparse_msg; fprintf(stderr, "%s: %s:", progname, file); if (line) fprintf(stderr, "%d:%d:", line, col + 1); - fprintf(stderr, " %s: %s", mparse_strlevel(lvl), - mparse_strerror(t)); + fprintf(stderr, " %s", mparse_strlevel(lvl)); + + if (NULL != (mparse_msg = mparse_strerror(t))) + fprintf(stderr, ": %s", mparse_msg); if (msg) fprintf(stderr, ": %s", msg); |