1
0
Fork 0

(svn r2966) Fix: newgrf: Replace special case with a check for the existence of a handler in VehicleChangeInfo.

release/0.4.5
peter1138 2005-09-20 17:33:57 +00:00
parent 2f0616e9f2
commit 5676cc32b4
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}