mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
Don't use doubles in RandomDevice.
...since Computron doesn't have FPU support yet, I'm gonna avoid using it here in Serenity for now.
This commit is contained in:
parent
c8b7173aa8
commit
72514c8b97
Notes:
sideshowbarker
2024-07-19 18:45:00 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/72514c8b978
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ Unix::ssize_t RandomDevice::read(byte* buffer, Unix::size_t bufferSize)
|
|||
const int range = 'z' - 'a';
|
||||
Unix::ssize_t nread = min(bufferSize, GoodBufferSize);
|
||||
for (Unix::ssize_t i = 0; i < nread; ++i) {
|
||||
double r = ((double)myrand() / (double)MY_RAND_MAX) * (double)range;
|
||||
dword r = myrand() % range;
|
||||
buffer[i] = 'a' + r;
|
||||
}
|
||||
return nread;
|
||||
|
|
Loading…
Reference in a new issue