diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-11 18:03:26 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-11 18:03:26 -0800 |
commit | ef487406436407320a54273d5668bf1520e08d67 (patch) | |
tree | 6d09d394cc58ed705401327c2265958b56fdc88f /src/houdini_html_u.c | |
parent | 8feee5b94f0e5ed4b09eca537a0e795a763f1e84 (diff) | |
parent | 491b7775b273daf1325a1b050345dbf75b394315 (diff) |
Merge pull request #281 from nwellnhof/shrink_entity_table
Reduce size of gperf entity table
Diffstat (limited to 'src/houdini_html_u.c')
-rw-r--r-- | src/houdini_html_u.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/houdini_html_u.c b/src/houdini_html_u.c index 9a2e262..ecd7faa 100644 --- a/src/houdini_html_u.c +++ b/src/houdini_html_u.c @@ -55,7 +55,8 @@ houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src, size_t size) const struct html_ent *entity = find_entity((char *)src, i); if (entity != NULL) { - cmark_strbuf_put(ob, entity->utf8, entity->utf8_len); + size_t len = strnlen((const char *)entity->utf8, 4); + cmark_strbuf_put(ob, entity->utf8, len); return i + 1; } |