From 0cf592b17a43a9588f0385c2e31ccc542afb0560 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 23 Feb 2007 21:03:57 +0000 Subject: (svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check --- src/newgrf.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/newgrf.cpp') diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 0d5e2507a..bffb58749 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1480,6 +1480,11 @@ static void SafeChangeInfo(byte *buf, int len) 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); -- cgit v1.2.3-70-g09d2