commit d9da5d2: [Minor] Fix condition

Vsevolod Stakhov vsevolod at highsecure.ru
Sat May 18 07:21:08 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-05-18 08:19:44 +0100
URL: https://github.com/rspamd/rspamd/commit/d9da5d2ba37ee2324e1c3cd940744a82910fd8b0 (HEAD -> master)

[Minor] Fix condition

---
 src/lua/lua_expression.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/lua_expression.c b/src/lua/lua_expression.c
index d2c1b4a4b..84d33a26e 100644
--- a/src/lua/lua_expression.c
+++ b/src/lua/lua_expression.c
@@ -352,7 +352,7 @@ lua_expr_create (lua_State *L)
 
 	/* Check sanity of the arguments */
 	if (lua_type (L, 1) != LUA_TSTRING ||
-			(lua_type (L, 2) != LUA_TTABLE || lua_type (L, 2) != LUA_TFUNCTION) ||
+			(lua_type (L, 2) != LUA_TTABLE && lua_type (L, 2) != LUA_TFUNCTION) ||
 			rspamd_lua_check_mempool (L, 3) == NULL) {
 		msg_info ("bad arguments to lua_expr_create");
 		lua_pushnil (L);


More information about the Commits mailing list