mirror of https://github.com/OpenTTD/OpenTTD
(svn r2966) Fix: newgrf: Replace special case with a check for the existence of a handler in VehicleChangeInfo.
parent
2f0616e9f2
commit
5676cc32b4
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",
|
DEBUG(grf, 6) ("VehicleChangeInfo: Feature %d, %d properties, to apply to %d+%d",
|
||||||
feature, numprops, engine, numinfo);
|
feature, numprops, engine, numinfo);
|
||||||
|
|
||||||
if (feature > GSF_STATION) {
|
if (feature >= lengthof(handler) || handler[feature] == NULL) {
|
||||||
grfmsg(GMS_WARN, "VehicleChangeInfo: Unsupported feature %d, skipping.", feature);
|
grfmsg(GMS_WARN, "VehicleChangeInfo: Unsupported feature %d, skipping.", feature);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue