mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r2966) Fix: newgrf: Replace special case with a check for the existence of a handler in VehicleChangeInfo.
This commit is contained in:
parent
316944c1f5
commit
75be0ed773
2
newgrf.c
2
newgrf.c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user