commit f509516: [Minor] Fix captures checking in lua_regexp
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu May 14 12:21:26 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-05-14 13:15:52 +0100
URL: https://github.com/rspamd/rspamd/commit/f5095168e1f44c8f02c462a9f34bf34169646492
[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));
More information about the Commits
mailing list