summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-05-01 21:02:18 +0000
committeryexo <yexo@openttd.org>2011-05-01 21:02:18 +0000
commite9837ff1ec1326aec622366ae29ff1aa81581daf (patch)
tree7897492e8aa5e039efcb3bbc355a4672f4bfd370 /src/newgrf.cpp
parent6a1eb377aee6b5e85e9095d90e4ce95973a2df47 (diff)
downloadopenttd-e9837ff1ec1326aec622366ae29ff1aa81581daf.tar.xz
(svn r22409) -Fix: [NewGRF] make sure the action2 ID of a generic feature callback is valid
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 4a14381e4..85d9a7ef8 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -4565,6 +4565,7 @@ static void FeatureMapSpriteGroup(ByteReader *buf)
/* Skip number of cargo ids? */
buf->ReadByte();
uint16 groupid = buf->ReadWord();
+ if (!IsValidGroupID(groupid, "FeatureMapSpriteGroup")) return;
grfmsg(6, "FeatureMapSpriteGroup: Adding generic feature callback for feature %d", feature);