mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 00:48:19 +01:00
Fixed data type inside fast_random_8() routine (#2818)
This commit is contained in:
parent
7afcb0fb04
commit
cae283dc86
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue