diff options
author | bjarni <bjarni@openttd.org> | 2007-01-22 10:27:14 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2007-01-22 10:27:14 +0000 |
commit | 2f5bc96b47b31727d2df846f3976f4d8da4ea7aa (patch) | |
tree | 315f395e67e45a3d45e46eb396b5291994396035 | |
parent | 8c9afdcadf44e2ca1fa27b93fcf791e907d7719e (diff) | |
download | openttd-2f5bc96b47b31727d2df846f3976f4d8da4ea7aa.tar.xz |
(svn r8341) -Codechange (r8336): added assert to VehTypeToIndex() to ensure valid vehicle types in the argument
-rw-r--r-- | src/vehicle.h | 1 |
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; } |