From: Vsevolod Stakhov Date: Thu, 14 May 2020 12:15:52 +0000 (+0100) Subject: [Minor] Fix captures checking in lua_regexp X-Git-Tag: 2.6~423 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5095168e1f44c8f02c462a9f34bf34169646492;p=thirdparty%2Frspamd.git [Minor] Fix captures checking in lua_regexp --- diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c index b782ef7f10..bd3706d16d 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));