From 78ca3e3d671b785d7ad7d159dd07480ccdaba859 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 27 Jan 2001 15:42:23 +0000 Subject: 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] --- bk_xhtml.c | 3 +-- 1 file changed, 1 insertion(+), 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); } } } -- cgit v1.1