diff options
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r-- | src/lua/lua_regexp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c index 60dbc5edc..2f7ea3ea1 100644 --- a/src/lua/lua_regexp.c +++ b/src/lua/lua_regexp.c @@ -348,14 +348,12 @@ lua_regexp_search (lua_State *L) if (capture) { lua_newtable (L); - lua_pushlstring (L, start, end - start); - lua_rawseti (L, -2, 1); for (capn = 0; capn < captures->len; capn ++) { cap = &g_array_index (captures, struct rspamd_re_capture, capn); lua_pushlstring (L, cap->p, cap->len); - lua_rawseti (L, -2, capn + 2); + lua_rawseti (L, -2, capn + 1); } lua_rawseti (L, -2, ++i); |