summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf.cpp')
-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);