summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-02-20 16:17:45 +0000
committerfrosch <frosch@openttd.org>2010-02-20 16:17:45 +0000
commite905cb57d8200b363dbab5732e090b222d2fd34a (patch)
treecc28d23e70ac29c75de9ef33b3f50eeb7d495571
parent7c51a82020b414f23fee7638ec6096764e7ba7eb (diff)
downloadopenttd-e905cb57d8200b363dbab5732e090b222d2fd34a.tar.xz
(svn r19167) -Fix [FS#3631](r19120): Industry 0 could be choosen even if not available.
-rw-r--r--src/industry_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index aa75c2716..7e6f0e47f 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1903,7 +1903,7 @@ void GenerateIndustries()
for (uint i = 0; i < total_amount; i++) {
uint32 r = RandomRange(total_prob);
IndustryType it = 0;
- while (it < NUM_INDUSTRYTYPES && r > industry_probs[it]) {
+ while (it < NUM_INDUSTRYTYPES && r >= industry_probs[it]) {
r -= industry_probs[it];
it++;
}