Skip to content

Commit

Permalink
Fixes "loading database" rotation for x64
Browse files Browse the repository at this point in the history
`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...```
  • Loading branch information
ner00 authored Dec 10, 2016
1 parent 3b585fb commit 69442f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clamscan/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 69442f2

Please sign in to comment.