summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-01-02 01:29:31 -0600
committersanine <sanine.not@pm.me>2022-01-02 01:29:31 -0600
commit3c95c890245cbd79c9f31c316e7334a8f9229f04 (patch)
treeaee7aa1a121ba45709213541294a6cd95efd8745
parenta0c01b8ab019039094f036a287db6cfdbe9cdca6 (diff)
append null character to html buffer
-rw-r--r--src/bindings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bindings.c b/src/bindings.c
index 235e2df..eb9710c 100644
--- a/src/bindings.c
+++ b/src/bindings.c
@@ -58,6 +58,8 @@ int markdown(lua_State *L)
if (data.ok == false)
hs_throw_error(L, "encountered error (re)allocating html buffer memory!");
+ data.buf[data.index] = 0;
+
lua_pushstring(L, data.buf);
free(data.buf);