Merge pull request #1555 from N-R-K/icons_fix_ub

icons-hash: fix bitwise rotation
This commit is contained in:
Arun 2023-01-03 04:38:26 +05:30 committed by GitHub
commit fa62b08243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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