aboutsummaryrefslogtreecommitdiff
path: root/cores
diff options
context:
space:
mode:
Diffstat (limited to 'cores')
-rw-r--r--cores/arduino/WMath.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/WMath.cpp b/cores/arduino/WMath.cpp
index c1471ca..78667f3 100644
--- a/cores/arduino/WMath.cpp
+++ b/cores/arduino/WMath.cpp
@@ -40,7 +40,7 @@ long random(long howbig)
if (howbig == 0){
return 0;
}
- return rand() % howbig;
+ return (rand() * 0x10000L + rand()) % howbig;
}
long random(long howsmall, long howbig)