commit d3360f8: [Minor] Lua_trie: Fix match for lua_text

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Sep 6 17:49:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-06 12:28:20 +0100
URL: https://github.com/rspamd/rspamd/commit/d3360f80fc68af9c486ec66bd77c2c8723944058

[Minor] Lua_trie: Fix match for lua_text

---
 src/lua/lua_trie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/lua_trie.c b/src/lua/lua_trie.c
index b030c735a..82d11c50c 100644
--- a/src/lua/lua_trie.c
+++ b/src/lua/lua_trie.c
@@ -290,7 +290,7 @@ lua_trie_match (lua_State *L)
 			}
 		}
 		else if (lua_type (L, 2) == LUA_TUSERDATA) {
-			t = lua_check_text (L, -1);
+			t = lua_check_text (L, 2);
 
 			if (t && lua_trie_search_str (L, trie, t->start, t->len, cb)) {
 				found = TRUE;


More information about the Commits mailing list