summaryrefslogtreecommitdiff
path: root/grfspecial.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-11-14 13:11:38 +0000
committerdarkvater <darkvater@openttd.org>2004-11-14 13:11:38 +0000
commit552689b7fe6241d85c7a6ba4f0bd3fb663103aa3 (patch)
tree6a8a2143c68a52b0a01d3674ac06c6a898bea61d /grfspecial.c
parent397cc50f61768c73dd4a1ddea03fd5e763d85b50 (diff)
downloadopenttd-552689b7fe6241d85c7a6ba4f0bd3fb663103aa3.tar.xz
(svn r588) -newgrf: Silent ignore those stupid one-byte zero special sprites (dbsetw.grf is crawling with them) (pasky).
Diffstat (limited to 'grfspecial.c')
-rw-r--r--grfspecial.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/grfspecial.c b/grfspecial.c
index a87ad7deb..58e25e24a 100644
--- a/grfspecial.c
+++ b/grfspecial.c
@@ -902,6 +902,11 @@ static void VehicleChangeInfo(byte *buf, int len)
byte engine;
EngineInfo *ei;
+ if (len == 1) {
+ DEBUG(grf, 8) ("Silently ignoring one-byte special sprite 0x00.");
+ return;
+ }
+
check_length(len, 6, "VehicleChangeInfo");
feature = buf[1];
numprops = buf[2];