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

This commit is contained in:
bjarni
2007-01-22 10:27:14 +00:00
parent 8c9afdcadf
commit 2f5bc96b47

View File

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