From a14de92f38c6f35129bec9c9194990125bbbdcef Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 23 Feb 2007 21:03:57 +0000 Subject: [PATCH] (svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check --- src/newgrf.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 0d5e2507a1..bffb587495 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);