(svn r7242) -Fix: Don't load 1-byte pseudo sprites, as used in some NewGRF sets. If the sprite is ever drawn this will result in a "missing sprite" error instead of undefined misbehaviour leading to segmentation faults...
--- a/spritecache.c Wed Nov 22 23:25:31 2006 +0000
+++ b/spritecache.c Thu Nov 23 21:19:43 2006 +0000
@@ -45,7 +45,9 @@
type = FioReadByte();
if (type == 0xFF) {
FioSkipBytes(num);
- return true;
+ /* Some NewGRF files have "empty" pseudo-sprites which are 1
+ * byte long. Catch these so the sprites won't be displayed. */
+ return num != 1;
}
FioSkipBytes(7);