mirror of https://github.com/OpenTTD/OpenTTD.git
(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...
This commit is contained in:
parent
59723b113e
commit
1ce4eda576
|
@ -45,7 +45,9 @@ static bool ReadSpriteHeaderSkipData(void)
|
||||||
type = FioReadByte();
|
type = FioReadByte();
|
||||||
if (type == 0xFF) {
|
if (type == 0xFF) {
|
||||||
FioSkipBytes(num);
|
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);
|
FioSkipBytes(7);
|
||||||
|
|
Loading…
Reference in New Issue