commit 2cdad98: [Minor] Fix khash set operation

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Sep 16 12:42:06 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-16 13:37:51 +0100
URL: https://github.com/rspamd/rspamd/commit/2cdad98690ea42c0b0322f3de913adfb24332277 (HEAD -> master)

[Minor] Fix khash set operation

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

diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index 562adf5d5..bfd572532 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -1248,7 +1248,7 @@ rspamd_lua_check_class (lua_State *L, gint index, const gchar *name)
 				}
 
 				lua_rawgetp (L, LUA_REGISTRYINDEX,
-						RSPAMD_LIGHTUSERDATA_MASK (kh_value (lua_classes, k)));
+						RSPAMD_LIGHTUSERDATA_MASK (kh_key (lua_classes, k)));
 
 				if (lua_rawequal (L, -1, -2)) {  /* does it have the correct mt? */
 					lua_pop (L, 2);  /* remove both metatables */


More information about the Commits mailing list