changeset 17638:7f017140fa5b draft

(svn r22409) -Fix: [NewGRF] make sure the action2 ID of a generic feature callback is valid
author yexo <yexo@openttd.org>
date Sun, 01 May 2011 21:02:18 +0000
parents 7fce3eb88c81
children 3cd4f18cdbc1
files src/newgrf.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -4565,6 +4565,7 @@
 		/* 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);