mirror of
https://github.com/jarun/nnn.git
synced 2025-01-15 21:36:42 +00:00
Merge pull request #1555 from N-R-K/icons_fix_ub
icons-hash: fix bitwise rotation
This commit is contained in:
commit
fa62b08243
|
@ -109,7 +109,7 @@ pcg(uint64_t *state)
|
||||||
*state *= GOLDEN_RATIO_64;
|
*state *= GOLDEN_RATIO_64;
|
||||||
uint32_t r = (oldstate >> 59);
|
uint32_t r = (oldstate >> 59);
|
||||||
uint32_t v = (oldstate ^ (oldstate >> 18)) >> 27;
|
uint32_t v = (oldstate ^ (oldstate >> 18)) >> 27;
|
||||||
return (v >> (32 - r)) | (v << r);
|
return (v >> (-r & 31)) | (v << r);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in a new issue