(svn r19167) -Fix [FS#3631](r19120): Industry 0 could be choosen even if not available.

This commit is contained in:
frosch 2010-02-20 16:17:45 +00:00
parent 7c51a82020
commit e905cb57d8
1 changed files with 1 additions and 1 deletions

View File

@ -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++;
}