diff options
author | peter1138 <peter1138@openttd.org> | 2007-02-23 21:03:57 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-02-23 21:03:57 +0000 |
commit | 0cf592b17a43a9588f0385c2e31ccc542afb0560 (patch) | |
tree | 72f1bf2e2cc0f0bd80c991dc674cfe2bd0c1f97d /src | |
parent | dac3cd622f82c127fce8e57004e540c0eb6024a5 (diff) | |
download | openttd-0cf592b17a43a9588f0385c2e31ccc542afb0560.tar.xz |
(svn r8865) -Codechange: (NewGRF) Ignore 1 byte action 0s during safety check
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf.cpp | 5 |
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); |