From 69442f26204bd81d87c0c581a9364087e015b9d5 Mon Sep 17 00:00:00 2001 From: ner0 Date: Sat, 10 Dec 2016 15:38:35 +0000 Subject: [PATCH] Fixes "loading database" rotation for x64 `sizeof(rotation)` returns 8 instead of 4 on x64 builds. Specifying the exact amount of characters to be rotated prevents that the console prints multiple lines like: ```Loading virus signature database, please wait... Loading virus signature database, please wait... Loading virus signature database, please wait... Loading virus signature database, please wait... Loading virus signature database, please wait...``` --- clamscan/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clamscan/manager.c b/clamscan/manager.c index cb34eb7374..f3aa76b453 100644 --- a/clamscan/manager.c +++ b/clamscan/manager.c @@ -122,7 +122,7 @@ static void rotate(cb_data_t *cbctx, const char *fmt) if ((cbctx->count++ % 100000) == 0) { mprintf(fmt, cbctx->filename, rotation[cbctx->oldvalue]); - cbctx->oldvalue = (cbctx->oldvalue + 1) % sizeof(rotation); + cbctx->oldvalue = (cbctx->oldvalue + 1) % 4; } }