From 2a22f706c2ee399e7932772be3ed94c47f487913 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 16 Feb 2018 12:58:47 +0000 Subject: [PATCH] [Fix] Fix variable increment --- src/libutil/logger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libutil/logger.c b/src/libutil/logger.c index 59e89158c0..1fade81642 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -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); -- 2.47.3