From 9f73cf6bb1e1c2bf3a8aac7c0729296e3dc00292 Mon Sep 17 00:00:00 2001 From: bjarni Date: Mon, 22 Jan 2007 10:27:14 +0000 Subject: (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 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; } -- cgit v1.2.3-70-g09d2