summaryrefslogtreecommitdiff
path: root/src/q_rand.cc
diff options
context:
space:
mode:
authorElmo Todurov <elmo.todurov@eesti.ee>2014-08-13 23:14:11 +0300
committerBardur Arantsson <bardur@scientician.net>2014-08-24 14:32:10 +0200
commit3a17a2afacff1c2eea95f43c051377516dd0b8ab (patch)
tree50172353dd932bda181a450f705d848088ef420e /src/q_rand.cc
parent4f0516c42de23fedbd77e78b563b5b63c99a7bdc (diff)
Fixed starting with 0 random quests
Diffstat (limited to 'src/q_rand.cc')
-rw-r--r--src/q_rand.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/q_rand.cc b/src/q_rand.cc
index 17774204..76f129e2 100644
--- a/src/q_rand.cc
+++ b/src/q_rand.cc
@@ -26,6 +26,8 @@ void initialize_random_quests(int n)
/* Zero out everything first */
for (i = 0; i < MAX_RANDOM_QUEST; i++) random_quests[i].type = 0;
+ if (n == 0) return;
+
/* Factor dlev value by 1000 to keep precision */
step = (98 * 1000) / n;