From 2f5bc96b47b31727d2df846f3976f4d8da4ea7aa Mon Sep 17 00:00:00 2001 From: bjarni Date: Mon, 22 Jan 2007 10:27:14 +0000 Subject: [PATCH] (svn r8341) -Codechange (r8336): added assert to VehTypeToIndex() to ensure valid vehicle types in the argument --- src/vehicle.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vehicle.h b/src/vehicle.h index cb0025a9dd..9a14c66f70 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; }