diff options
author | Kim Alvefur <zash@zash.se> | 2020-10-15 17:23:21 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-10-15 17:23:21 +0200 |
commit | 1784c121bbe28405d06488862e336d54ffe7dd90 (patch) | |
tree | 61416e7db512ea96c9c5fbc0484fff0807d1d07c /util-src/strbitop.c | |
parent | fba7208d2039b9c9074ac9666651dc414427540f (diff) | |
parent | d040d165bd8123f1fcedabbf0b7c435e192a6c18 (diff) | |
download | prosody-1784c121bbe28405d06488862e336d54ffe7dd90.tar.gz prosody-1784c121bbe28405d06488862e336d54ffe7dd90.zip |
Merge 0.11->trunk
Diffstat (limited to 'util-src/strbitop.c')
-rw-r--r-- | util-src/strbitop.c | 4 |
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; |