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 | 5676cc32b4269a3aa5f00bf361df679ed63083ce (patch) | |
tree | 58a79016fe6b363434463332a69940280c6b89dd | |
parent | 2f0616e9f2c821830a8533fd7bde0c1660604215 (diff) | |
download | openttd-5676cc32b4269a3aa5f00bf361df679ed63083ce.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; } |