]> source.dussan.org Git - rspamd.git/commitdiff
-1 is a *very* bad unit64_t
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 8 Jan 2016 16:21:10 +0000 (16:21 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 8 Jan 2016 16:21:10 +0000 (16:21 +0000)
src/libstat/backends/redis_backend.c

index 240584a5131825d6b12cd3d9cbd836e225d157f3..a9fbe3993c9d14aabb8cc91e3ac2e11866d5bb9f 100644 (file)
@@ -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, ""