From a8288a38f8ccbaf7976943a94724e0a18a1eac68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 21 Aug 2017 11:01:56 +0200 Subject: [PATCH] Allow sprites with empty frames to pass the ShpTS checks. --- OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs b/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs index e216e55cdc..a89949eab8 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/ShpTSLoader.cs @@ -104,7 +104,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders return false; } - // Check the size and format flag + // Check the image size and compression type format flag // Some files define bogus frames, so loop until we find a valid one s.Position += 4; ushort w, h, f = 0; @@ -114,6 +114,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders w = s.ReadUInt16(); h = s.ReadUInt16(); type = s.ReadUInt8(); + s.Position += 19; } while (w == 0 && h == 0 && f++ < imageCount);