From 79402fe47a7d2474199f01d20c42d51f8f231336 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 8 Jan 2016 16:21:10 +0000 Subject: [PATCH] -1 is a *very* bad unit64_t --- src/libstat/backends/redis_backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 240584a51..a9fbe3993 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -323,12 +323,12 @@ rspamd_redis_tokens_to_query (struct rspamd_task *task, GPtrArray *tokens, l0 = rspamd_snprintf (n0, sizeof (n0), "%uL", num); if (intvals) { - l1 = rspamd_snprintf (n1, sizeof (n1), "%uL", - (guint64)tok->values[idx]); + l1 = rspamd_snprintf (n1, sizeof (n1), "%L", + (gint64)tok->values[idx]); } else { l1 = rspamd_snprintf (n1, sizeof (n1), "%f", - (guint64)tok->values[idx]); + tok->values[idx]); } rspamd_printf_fstring (&out, "" -- 2.39.5