aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-15 17:23:21 +0200
committerKim Alvefur <zash@zash.se>2020-10-15 17:23:21 +0200
commiteefbd36485435744ae056bca12afcccb6c8a26a0 (patch)
tree61416e7db512ea96c9c5fbc0484fff0807d1d07c /util-src
parent203b48b127ebfc16ec092b7dfba1836b3a70a8fd (diff)
parent20fc0c9c153bf5f25c924daa5e6cf988f9d3c2ff (diff)
downloadprosody-eefbd36485435744ae056bca12afcccb6c8a26a0.tar.gz
prosody-eefbd36485435744ae056bca12afcccb6c8a26a0.zip
Merge 0.11->trunk
Diffstat (limited to 'util-src')
-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;