summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);