summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-09-17 16:12:21 +0000
committerFate <fate-tmw@googlemail.com>2009-09-17 16:12:21 +0000
commitf56cd8a8b05817d725e44143654d2256e440b236 (patch)
treea50674f9d1a36e0423c0f76ddebb6d7930ebfbe4
parentd7b6afc444c1fac508dd5cc4bdf7e4dfa57e50c2 (diff)
downloadtmwa-f56cd8a8b05817d725e44143654d2256e440b236.tar.gz
tmwa-f56cd8a8b05817d725e44143654d2256e440b236.tar.bz2
tmwa-f56cd8a8b05817d725e44143654d2256e440b236.tar.xz
tmwa-f56cd8a8b05817d725e44143654d2256e440b236.zip
MRAND now wraps its modulo parameter in parentheses to avoid misassociation
-rw-r--r--src/common/utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index 0b006c3..88d1027 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -38,5 +38,5 @@
* MRAND(10), returns 0-9.
* MPRAND(5,10) returns 5-14.
*/
-#define MRAND(mod) (int) (mt_random() % mod)
+#define MRAND(mod) (int) (mt_random() % (mod))
#define MPRAND(add, mod) add + MRAND(mod)