changeset 5789:b34394075792 draft

(svn r8341) -Codechange (r8336): added assert to VehTypeToIndex() to ensure valid vehicle types in the argument
author bjarni <bjarni@openttd.org>
date Mon, 22 Jan 2007 10:27:14 +0000
parents 52bff18d6684
children 2a0357eafb2b
files src/vehicle.h
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/vehicle.h
+++ b/src/vehicle.h
@@ -429,6 +429,7 @@
  */
 static inline byte VehTypeToIndex(byte type)
 {
+	assert(IsPlayerBuildableVehicleType(type));
 	return type - VEH_Train;
 }