diff options
author | peter1138 <peter1138@openttd.org> | 2005-10-12 09:54:29 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2005-10-12 09:54:29 +0000 |
commit | 5551b423fc4e6b6f7365c8e59272c755d8c3bde9 (patch) | |
tree | f5a7c1c6a6479ae68b002a2fc606e9aff5153826 /economy.c | |
parent | 0321dc9fc5c3d6aa9944ddd75a3f0e20745bcb86 (diff) | |
download | openttd-5551b423fc4e6b6f7365c8e59272c755d8c3bde9.tar.xz |
(svn r3034) -NewGRF: Improve error checking of setting price bases.
Diffstat (limited to 'economy.c')
-rw-r--r-- | economy.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -775,7 +775,7 @@ static byte price_base_multiplier[NUM_PRICES]; */ void ResetPriceBaseMultipliers(void) { - int i; + uint i; // 8 means no multiplier. for (i = 0; i < NUM_PRICES; i++) @@ -789,10 +789,10 @@ void ResetPriceBaseMultipliers(void) * @param price Index of price base to change. * @param factor Amount to change by. */ -void SetPriceBaseMultiplier(int price, byte factor) +void SetPriceBaseMultiplier(uint price, byte factor) { - if (price < NUM_PRICES) - price_base_multiplier[price] = factor; + assert(price < NUM_PRICES); + price_base_multiplier[price] = factor; } void StartupEconomy(void) |