diff options
author | peter1138 <peter1138@openttd.org> | 2005-09-20 17:33:57 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2005-09-20 17:33:57 +0000 |
commit | 75be0ed773b9839c96c19fbd05a3d744b8ab3f6e (patch) | |
tree | 58a79016fe6b363434463332a69940280c6b89dd | |
parent | 316944c1f5ae2ae6fd4ca574da25cdfbf324aceb (diff) | |
download | openttd-75be0ed773b9839c96c19fbd05a3d744b8ab3f6e.tar.xz |
(svn r2966) Fix: newgrf: Replace special case with a check for the existence of a handler in VehicleChangeInfo.
-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; } |