Count all zero images as valid.
This commit is contained in:
committed by
abcdefg30
parent
a8288a38f8
commit
5b16bb952f
@@ -114,12 +114,17 @@ namespace OpenRA.Mods.Common.SpriteLoaders
|
|||||||
w = s.ReadUInt16();
|
w = s.ReadUInt16();
|
||||||
h = s.ReadUInt16();
|
h = s.ReadUInt16();
|
||||||
type = s.ReadUInt8();
|
type = s.ReadUInt8();
|
||||||
|
|
||||||
|
// Zero sized frames always define a non-zero type
|
||||||
|
if ((w == 0 || h == 0) && type == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
s.Position += 19;
|
s.Position += 19;
|
||||||
}
|
}
|
||||||
while (w == 0 && h == 0 && f++ < imageCount);
|
while (w == 0 && h == 0 && ++f < imageCount);
|
||||||
|
|
||||||
s.Position = start;
|
s.Position = start;
|
||||||
return type < 4;
|
return f == imageCount || type < 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShpTSFrame[] ParseFrames(Stream s)
|
ShpTSFrame[] ParseFrames(Stream s)
|
||||||
|
|||||||
Reference in New Issue
Block a user