summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-04 09:42:38 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-04 09:42:38 +0000
commitb83a9d881333255c1539b3f392dc344efa32d674 (patch)
tree104fd14f6c3b0a6edecf61393e52b506ff214d57
parent15ae9721617b86af0d3035bd1192a62ee7f8b9a9 (diff)
downloadmandoc-b83a9d881333255c1539b3f392dc344efa32d674.tar.gz
The bufcat() function in -T[x]html was eating one byte off the end of its
concatenated string. This for some reason hasn't been found before now... ? Anyway, fixed, and make the IDs created again be correctly prefixed by a letter as per the HTML spec.
-rw-r--r--html.c1
-rw-r--r--mdoc_html.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/html.c b/html.c
index 170e5361..bd4a18bb 100644
--- a/html.c
+++ b/html.c
@@ -595,7 +595,6 @@ bufcat(struct html *h, const char *p)
h->buflen = strlcat(h->buf, p, BUFSIZ);
assert(h->buflen < BUFSIZ);
- h->buflen--;
}
void
diff --git a/mdoc_html.c b/mdoc_html.c
index d7906a6c..bc9c52d0 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -610,6 +610,7 @@ mdoc_sh_pre(MDOC_ARGS)
return(1);
bufinit(h);
+ bufcat(h, "x");
for (n = n->child; n; n = n->next) {
bufcat_id(h, n->string);
if (n->next)
@@ -636,6 +637,7 @@ mdoc_ss_pre(MDOC_ARGS)
return(1);
bufinit(h);
+ bufcat(h, "x");
for (n = n->child; n; n = n->next) {
bufcat_id(h, n->string);
if (n->next)