From d040d165bd8123f1fcedabbf0b7c435e192a6c18 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 15 Oct 2020 17:21:58 +0200 Subject: Back out changeset 2c1583bb0e0f Same reason as 712b2e6a09d9 --- util-src/strbitop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util-src/strbitop.c') 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; -- cgit v1.2.3