summaryrefslogtreecommitdiff
path: root/bk_xhtml.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2001-01-27 15:42:23 +0000
committerSimon Tatham <anakin@pobox.com>2001-01-27 15:42:23 +0000
commit78ca3e3d671b785d7ad7d159dd07480ccdaba859 (patch)
tree053807ccf912d7f73d5612ee9c94cf7a6b060489 /bk_xhtml.c
parent670ef52114f7b705ee99765d3f0e9d47d4674b20 (diff)
downloadhalibut-78ca3e3d671b785d7ad7d159dd07480ccdaba859.zip
halibut-78ca3e3d671b785d7ad7d159dd07480ccdaba859.tar.gz
halibut-78ca3e3d671b785d7ad7d159dd07480ccdaba859.tar.bz2
halibut-78ca3e3d671b785d7ad7d159dd07480ccdaba859.tar.xz
Numeric entity references weren't working: the string pointer was
being incremented _past_ the NUL, so the rest of the string was lost. [originally from svn r902]
Diffstat (limited to 'bk_xhtml.c')
-rw-r--r--bk_xhtml.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bk_xhtml.c b/bk_xhtml.c
index dd1c834..f905ec6 100644
--- a/bk_xhtml.c
+++ b/bk_xhtml.c
@@ -1132,8 +1132,7 @@ static int xhtml_convert(wchar_t *s, char **result, int hard_spaces) {
} else {
/* FIXME: entity names! */
ensure_size(plen+7); /* includes space for the NUL, which is subsequently stomped on */
- sprintf(p+plen, "&#%i;", (int)c);
- plen+=7;
+ plen+=sprintf(p+plen, "&#%i;", (int)c);
}
}
}