(svn r8341) -Codechange (r8336): added assert to VehTypeToIndex() to ensure valid vehicle types in the argument
authorbjarni
Mon, 22 Jan 2007 10:27:14 +0000
changeset 6040 40cc9da90508
parent 6039 b829e392d192
child 6041 c1c8b674d756
(svn r8341) -Codechange (r8336): added assert to VehTypeToIndex() to ensure valid vehicle types in the argument
src/vehicle.h
--- a/src/vehicle.h	Mon Jan 22 08:38:18 2007 +0000
+++ b/src/vehicle.h	Mon Jan 22 10:27:14 2007 +0000
@@ -429,6 +429,7 @@
  */
 static inline byte VehTypeToIndex(byte type)
 {
+	assert(IsPlayerBuildableVehicleType(type));
 	return type - VEH_Train;
 }