From e905cb57d8200b363dbab5732e090b222d2fd34a Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 20 Feb 2010 16:17:45 +0000 Subject: [PATCH] (svn r19167) -Fix [FS#3631](r19120): Industry 0 could be choosen even if not available. --- src/industry_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index aa75c2716c..7e6f0e47f8 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++; }