(svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check
authorpeter1138
Fri, 23 Feb 2007 21:03:57 +0000
changeset 6454 05179065897e
parent 6453 e65715f6e063
child 6455 4b0a3d229026
(svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check
src/newgrf.cpp
--- a/src/newgrf.cpp	Fri Feb 23 20:51:10 2007 +0000
+++ b/src/newgrf.cpp	Fri Feb 23 21:03:57 2007 +0000
@@ -1480,6 +1480,11 @@
 	uint8 numinfo;
 	uint8 index;
 
+	if (len == 1) {
+		grfmsg(8, "Silently ignoring one-byte special sprite 0x00");
+		return;
+	}
+
 	if (!check_length(len, 6, "SafeChangeInfo")) return;
 	buf++;
 	feature  = grf_load_byte(&buf);