summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-02-23 21:03:57 +0000
committerpeter1138 <peter1138@openttd.org>2007-02-23 21:03:57 +0000
commit0cf592b17a43a9588f0385c2e31ccc542afb0560 (patch)
tree72f1bf2e2cc0f0bd80c991dc674cfe2bd0c1f97d
parentdac3cd622f82c127fce8e57004e540c0eb6024a5 (diff)
downloadopenttd-0cf592b17a43a9588f0385c2e31ccc542afb0560.tar.xz
(svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check
-rw-r--r--src/newgrf.cpp5
1 files changed, 5 insertions, 0 deletions
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);