aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-15 17:21:58 +0200
committerKim Alvefur <zash@zash.se>2020-10-15 17:21:58 +0200
commit20fc0c9c153bf5f25c924daa5e6cf988f9d3c2ff (patch)
tree568d9acc6b7532e859e7039304cd2b10e92ab863
parentbad47be8f936a1d55123d1c3e5ffdb30d493abcc (diff)
downloadprosody-20fc0c9c153bf5f25c924daa5e6cf988f9d3c2ff.tar.gz
prosody-20fc0c9c153bf5f25c924daa5e6cf988f9d3c2ff.zip
Back out changeset 2c1583bb0e0f
Same reason as 712b2e6a09d9
-rw-r--r--util-src/strbitop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util-src/strbitop.c b/util-src/strbitop.c
index 2c6a4e4d..89fce661 100644
--- a/util-src/strbitop.c
+++ b/util-src/strbitop.c
@@ -20,6 +20,8 @@ int strop_and(lua_State *L) {
const char *str_a = luaL_checklstring(L, 1, &a);
const char *str_b = luaL_checklstring(L, 2, &b);
+ luaL_buffinit(L, &buf);
+
if(a == 0 || b == 0) {
lua_settop(L, 1);
return 1;
@@ -39,6 +41,8 @@ int strop_or(lua_State *L) {
const char *str_a = luaL_checklstring(L, 1, &a);
const char *str_b = luaL_checklstring(L, 2, &b);
+ luaL_buffinit(L, &buf);
+
if(a == 0 || b == 0) {
lua_settop(L, 1);
return 1;