(svn r2966) Fix: newgrf: Replace special case with a check for the existence of a handler in VehicleChangeInfo.
--- a/newgrf.c Tue Sep 20 11:07:33 2005 +0000
+++ b/newgrf.c Tue Sep 20 17:33:57 2005 +0000
@@ -1041,7 +1041,7 @@
DEBUG(grf, 6) ("VehicleChangeInfo: Feature %d, %d properties, to apply to %d+%d",
feature, numprops, engine, numinfo);
- if (feature > GSF_STATION) {
+ if (feature >= lengthof(handler) || handler[feature] == NULL) {
grfmsg(GMS_WARN, "VehicleChangeInfo: Unsupported feature %d, skipping.", feature);
return;
}