summaryrefslogtreecommitdiff
path: root/Source/Library/Common/Rand.ns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Library/Common/Rand.ns.cpp')
-rw-r--r--Source/Library/Common/Rand.ns.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Library/Common/Rand.ns.cpp b/Source/Library/Common/Rand.ns.cpp
index e568678..6323ccc 100644
--- a/Source/Library/Common/Rand.ns.cpp
+++ b/Source/Library/Common/Rand.ns.cpp
@@ -7,7 +7,7 @@ u64int current = RANDOM_SEED;
u64int rand() {
current = (u32int)(a*current + b);
- while (current > m) current -= m;
+ if (current > m) current = current % m;
return current;
}