Fixed data type inside fast_random_8() routine (#2818)

This commit is contained in:
anatoly-savchenkov 2021-11-28 22:31:15 +03:00 committed by GitHub
parent 7afcb0fb04
commit cae283dc86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ uint16_t fast_random_16() {
return (rand32 & 0xFFFF) + (rand32 >> 16);
}
uint8_t fast_random_8() {
uint8_t rand32 = fast_random_32();
uint32_t rand32 = fast_random_32();
return (rand32 & 0xFF) + ((rand32 >> 8) & 0xFF);
}