aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r--src/lua/lua_regexp.c2
1 files changed, 1 insertions, 1 deletions
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));