aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/expression.c
diff options
context:
space:
mode:
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);