From f5095168e1f44c8f02c462a9f34bf34169646492 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 14 May 2020 13:15:52 +0100 Subject: [PATCH] [Minor] Fix captures checking in lua_regexp --- src/lua/lua_regexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c index b782ef7f1..bd3706d16 100644 --- a/src/lua/lua_regexp.c +++ b/src/lua/lua_regexp.c @@ -513,7 +513,7 @@ lua_regexp_search (lua_State *L) } if (data && len > 0) { - if (lua_gettop (L) >= 4) { + if (lua_gettop (L) >= 4 && lua_toboolean (L, 4)) { capture = TRUE; captures = g_array_new (FALSE, TRUE, sizeof (struct rspamd_re_capture)); -- 2.39.5