From: Vsevolod Stakhov Date: Fri, 8 Jan 2016 16:21:10 +0000 (+0000) Subject: -1 is a *very* bad unit64_t X-Git-Tag: 1.1.0~93 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79402fe47a7d2474199f01d20c42d51f8f231336;p=thirdparty%2Frspamd.git -1 is a *very* bad unit64_t --- diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 240584a513..a9fbe3993c 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, ""