(svn r588) -newgrf: Silent ignore those stupid one-byte zero special sprites (dbsetw.grf is crawling with them) (pasky).
authordarkvater
Sun, 14 Nov 2004 13:11:38 +0000
changeset 396 a89470eeb5d3
parent 395 788a9bba0889
child 397 b821a2eaeffa
(svn r588) -newgrf: Silent ignore those stupid one-byte zero special sprites (dbsetw.grf is crawling with them) (pasky).
grfspecial.c
--- a/grfspecial.c	Sun Nov 14 13:07:07 2004 +0000
+++ b/grfspecial.c	Sun Nov 14 13:11:38 2004 +0000
@@ -902,6 +902,11 @@
 	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];