From 480c1bd9e0b9bf9447513547d907908184ed2578 Mon Sep 17 00:00:00 2001 From: yexo Date: Sun, 1 May 2011 21:02:18 +0000 Subject: [PATCH] (svn r22409) -Fix: [NewGRF] make sure the action2 ID of a generic feature callback is valid --- src/newgrf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 4a14381e42..85d9a7ef8a 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);