]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix khash set operation
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 16 Sep 2019 12:37:51 +0000 (13:37 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 16 Sep 2019 12:37:51 +0000 (13:37 +0100)
src/lua/lua_common.c

index 562adf5d549234ced607251a27d550c4f9310f32..bfd572532cf5266113f80ec6c5d88016e7e2e5a5 100644 (file)
@@ -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 */