diff options
author | Yorhel <git@yorhel.nl> | 2017-01-15 20:27:16 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2017-01-15 20:27:16 +0100 |
commit | 746889851c3e32acb596533f4782ff42acad6c4a (patch) | |
tree | d503607e6bfc6dc6d83bcc5f73d3397ca5538bd4 /lib | |
parent | 1ccc86ce86760f8e1c93ea9a690d28865a8daddd (diff) |
A few more HTML conversion improvements
- Fix segfault on empty output (bug was in XS code)
- Still better end-of-URL detection
- Recognize a few common multicharacter sections in man references
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ManUtils/ManUtils.xs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ManUtils/ManUtils.xs b/lib/ManUtils/ManUtils.xs index bb70e0a..e162c68 100644 --- a/lib/ManUtils/ManUtils.xs +++ b/lib/ManUtils/ManUtils.xs @@ -20,7 +20,7 @@ html(str) STRLEN len; char *inbuf = SvPV(str, len); struct StringWrap buf = grotty2html_wrap(inbuf, len); - SV *dest = newSVpv(buf.buf, buf.len); + SV *dest = buf.len ? newSVpv(buf.buf, buf.len) : newSVpv("", 0); grotty2html_free(buf); SvUTF8_on(dest); RETVAL = dest; |