diff options
author | frosch <frosch@openttd.org> | 2010-02-20 16:17:45 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-02-20 16:17:45 +0000 |
commit | e905cb57d8200b363dbab5732e090b222d2fd34a (patch) | |
tree | cc28d23e70ac29c75de9ef33b3f50eeb7d495571 /src | |
parent | 7c51a82020b414f23fee7638ec6096764e7ba7eb (diff) | |
download | openttd-e905cb57d8200b363dbab5732e090b222d2fd34a.tar.xz |
(svn r19167) -Fix [FS#3631](r19120): Industry 0 could be choosen even if not available.
Diffstat (limited to 'src')
-rw-r--r-- | src/industry_cmd.cpp | 2 |
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++; } |