diff options
-rw-r--r-- | newgrf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1041,7 +1041,7 @@ static void VehicleChangeInfo(byte *buf, int len) 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; } |