]> source.dussan.org Git - rspamd.git/commitdiff
Fix weight processing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 Jan 2016 15:36:07 +0000 (15:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 15 Jan 2016 15:36:07 +0000 (15:36 +0000)
src/lua/lua_config.c

index f867cfabe5563ae558a39df018e1971f3bc55f6c..b34cb4304415ea97f05328479573a8bd0b3b0f61 100644 (file)
@@ -1135,7 +1135,7 @@ lua_config_register_virtual_symbol (lua_State * L)
 
                if (name) {
                        ret = rspamd_symbols_cache_add_symbol (cfg->cache, name,
-                                       0, NULL, NULL,
+                                       weight > 0 ? 0 : -1, NULL, NULL,
                                        SYMBOL_TYPE_VIRTUAL, parent);
                }
        }