diff --git a/src/icons-hash.c b/src/icons-hash.c index 1b10ae47..da640353 100644 --- a/src/icons-hash.c +++ b/src/icons-hash.c @@ -109,7 +109,7 @@ pcg(uint64_t *state) *state *= GOLDEN_RATIO_64; uint32_t r = (oldstate >> 59); uint32_t v = (oldstate ^ (oldstate >> 18)) >> 27; - return (v >> (32 - r)) | (v << r); + return (v >> (-r & 31)) | (v << r); } int