(svn r8341) -Codechange (r8336): added assert to VehTypeToIndex() to ensure valid vehicle types in the argument

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
bjarni 18 years ago
parent 4099d62cb2
commit 9f73cf6bb1

@ -429,6 +429,7 @@ static inline bool IsPlayerBuildableVehicleType(const Vehicle *v)
*/ */
static inline byte VehTypeToIndex(byte type) static inline byte VehTypeToIndex(byte type)
{ {
assert(IsPlayerBuildableVehicleType(type));
return type - VEH_Train; return type - VEH_Train;
} }

Loading…
Cancel
Save