mirror of
https://github.com/esphome/esphome.git
synced 2024-11-16 10:45:48 +01:00
Fixed data type inside fast_random_8() routine (#2818)
This commit is contained in:
parent
7afcb0fb04
commit
cae283dc86
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user