mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 16:39:14 +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;
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue