From 0277935f574a683a7d25ccfd306a8c67db1d74c3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 15 Dec 2023 14:50:13 +0000 Subject: [PATCH] [Minor] Remove stupid threshold for saving symbol value --- src/controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller.c b/src/controller.c index 339cf1184..f05105e91 100644 --- a/src/controller.c +++ b/src/controller.c @@ -2414,7 +2414,7 @@ rspamd_controller_handle_savesymbols( val = ucl_object_todouble(jvalue); sym = g_hash_table_lookup(session->cfg->symbols, ucl_object_tostring(jname)); - if (sym && fabs(*sym->weight_ptr - val) > 0.01) { + if (sym && fabs(*sym->weight_ptr - val) > DBL_EPSILON) { if (!add_dynamic_symbol(ctx->cfg, DEFAULT_METRIC, ucl_object_tostring(jname), val)) { msg_err_session("add symbol failed for %s", -- 2.39.5