(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 5789 d087153d3659
parent 5788 1fa45a4601e7
child 5790 d4a732968bda
(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;
 }