summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-01-22 10:27:14 +0000
committerbjarni <bjarni@openttd.org>2007-01-22 10:27:14 +0000
commit9f73cf6bb1e1c2bf3a8aac7c0729296e3dc00292 (patch)
tree315f395e67e45a3d45e46eb396b5291994396035
parent4099d62cb213b06b8b18ccdb5401144f0dc86f6a (diff)
downloadopenttd-9f73cf6bb1e1c2bf3a8aac7c0729296e3dc00292.tar.xz
(svn r8341) -Codechange (r8336): added assert to VehTypeToIndex() to ensure valid vehicle types in the argument
-rw-r--r--src/vehicle.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vehicle.h b/src/vehicle.h
index cb0025a9d..9a14c66f7 100644
--- a/src/vehicle.h
+++ b/src/vehicle.h
@@ -429,6 +429,7 @@ static inline bool IsPlayerBuildableVehicleType(const Vehicle *v)
*/
static inline byte VehTypeToIndex(byte type)
{
+ assert(IsPlayerBuildableVehicleType(type));
return type - VEH_Train;
}