]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix variable increment
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Feb 2018 12:58:47 +0000 (12:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Feb 2018 13:01:14 +0000 (13:01 +0000)
src/libutil/logger.c

index 59e89158c02fb4b35cdb7f1eff41e226db8a5d7a..1fade8164240328d86f38761a89f7ebae446f0cc 100644 (file)
@@ -1139,11 +1139,11 @@ file_log_function (const gchar *module, const gchar *id,
                }
 
 
-               iov[r++].iov_base = (void *) &lf_chr;
+               iov[r].iov_base = (void *) &lf_chr;
                iov[r++].iov_len = 1;
 
                if (rspamd_log->flags & RSPAMD_LOG_FLAG_COLOR) {
-                       iov[r++].iov_base = "\033[0m";
+                       iov[r].iov_base = "\033[0m";
                        iov[r++].iov_len = sizeof ("\033[0m") - 1;
                        /* Call helper (for buffering) */
                        file_log_helper (rspamd_log, iov, r, level_flags);