summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--mdoc.c4
-rw-r--r--mmain.c9
3 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 1c05490c..da03ba30 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
.SUFFIXES: .html .sgml
-VERSION = 1.4.5
+VERSION = 1.4.6
VDATE = 9 March 2009
BINDIR = $(PREFIX)/bin
diff --git a/mdoc.c b/mdoc.c
index fffb2a92..cf97f493 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -501,10 +501,10 @@ macrowarn(struct mdoc *m, int ln, const char *buf)
{
if ( ! (MDOC_IGN_MACRO & m->pflags))
return(mdoc_perr(m, ln, 1, "unknown macro: %s%s",
- buf, buf[3] ? "..." : ""));
+ buf, strlen(buf) > 3 ? "..." : ""));
return(mdoc_pwarn(m, ln, 1, WARN_SYNTAX,
"unknown macro: %s%s",
- buf, buf[3] ? "..." : ""));
+ buf, strlen(buf) > 3 ? "..." : ""));
}
diff --git a/mmain.c b/mmain.c
index 11f11000..297ab0aa 100644
--- a/mmain.c
+++ b/mmain.c
@@ -312,18 +312,19 @@ parse(struct mmain *p)
}
ln[pos] = 0;
- if ( ! mdoc_parseln(p->mdoc, lnn, ln))
+ if ( ! mdoc_parseln(p->mdoc, lnn, ln)) {
+ free(ln);
return(0);
+ }
lnn++;
pos = 0;
}
}
- if (pos > 0)
- warnx("%s: file not eof-terminated", p->in);
-
if (ln)
free(ln);
+ if (pos > 0)
+ warnx("%s: file not eof-terminated", p->in);
return(mdoc_endparse(p->mdoc));
}