aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/expression.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-29 14:23:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-29 14:23:25 +0100
commit6ac7be499b330a26348253a80b082b744f346711 (patch)
tree1de5fcc25fb91ee23ff08f85a9463cf3b4331e64 /src/libutil/expression.c
parentd79cfb3b6dcd9866af0f729c6e7e7184c55a5085 (diff)
downloadrspamd-6ac7be499b330a26348253a80b082b744f346711.tar.gz
rspamd-6ac7be499b330a26348253a80b082b744f346711.zip
[Minor] Fix printing of expressions limits
Diffstat (limited to 'src/libutil/expression.c')
-rw-r--r--src/libutil/expression.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libutil/expression.c b/src/libutil/expression.c
index 0a5564788..21a137f43 100644
--- a/src/libutil/expression.c
+++ b/src/libutil/expression.c
@@ -1144,7 +1144,12 @@ rspamd_ast_string_traverse (GNode *n, gpointer d)
(int)elt->p.atom->len, elt->p.atom->str);
}
else if (elt->type == ELT_LIMIT) {
- rspamd_printf_gstring (res, "%f", elt->p.lim);
+ if (elt->p.lim == (double)(gint64)elt->p.lim) {
+ rspamd_printf_gstring (res, "%L", (gint64)elt->p.lim);
+ }
+ else {
+ rspamd_printf_gstring (res, "%f", elt->p.lim);
+ }
}
else {
op_str = rspamd_expr_op_to_str (elt->p.op);