changeset 14591:38beac06ddbe draft

(svn r19167) -Fix [FS#3631](r19120): Industry 0 could be choosen even if not available.
author frosch <frosch@openttd.org>
date Sat, 20 Feb 2010 16:17:45 +0000
parents ab09f716d042
children 72ec09befcc4
files src/industry_cmd.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1903,7 +1903,7 @@
 	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++;
 		}