diff options
author | van Hauser <vh@thc.org> | 2020-12-30 10:34:22 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-12-30 10:34:22 +0100 |
commit | 0246fe9200ec29afd56a545c41b9888be84eafbf (patch) | |
tree | c8e55cc91e9ebf79872c64ab92606aa11f2c4bcf /src/afl-performance.c | |
parent | 5d560c1ece100b2b8c67d080eee323483be9cf37 (diff) | |
download | afl++-0246fe9200ec29afd56a545c41b9888be84eafbf.tar.gz |
fix 32-bit mode, fix weighting
Diffstat (limited to 'src/afl-performance.c')
-rw-r--r-- | src/afl-performance.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/afl-performance.c b/src/afl-performance.c index 89b170eb..4bca95d6 100644 --- a/src/afl-performance.c +++ b/src/afl-performance.c @@ -56,13 +56,13 @@ inline AFL_RAND_RETURN rand_next(afl_state_t *afl) { // RomuTrio32 inline AFL_RAND_RETURN rand_next(afl_state_t *afl) { - AFL_RAND_RETURN xp = afl->rand_seed[0], yp = afl->rand_seed[1], - zp = afl->rand_seed[2]; + AFL_RAND_RETURN xp = (u32)afl->rand_seed[0], yp = (u32)afl->rand_seed[1], + zp = (u32)afl->rand_seed[2]; afl->rand_seed[0] = 3323815723u * zp; afl->rand_seed[1] = yp - xp; - afl->rand_seed[1] = ROTL(afl->rand_seed[1], 6); + afl->rand_seed[1] = ROTL((u32)afl->rand_seed[1], 6); afl->rand_seed[2] = zp - yp; - afl->rand_seed[2] = ROTL(afl->rand_seed[2], 22); + afl->rand_seed[2] = ROTL((u32)afl->rand_seed[2], 22); return xp; } |