changeset 6128:f47815f367a2 draft

(svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check
author peter1138 <peter1138@openttd.org>
date Fri, 23 Feb 2007 21:03:57 +0000
parents a8303346cd9c
children 60867a3aff90
files src/newgrf.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -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);