From c7ba369605d3ba550c4e0b1083696b68b72e9721 Mon Sep 17 00:00:00 2001 From: morkt Date: Thu, 23 Nov 2017 18:22:56 +0400 Subject: [PATCH] (PmpFormat.ReadMetaData): use PeekByte instead of ReadByte. --- ArcFormats/ScenePlayer/ImagePMP.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ArcFormats/ScenePlayer/ImagePMP.cs b/ArcFormats/ScenePlayer/ImagePMP.cs index 760a1eca..8bf1d408 100644 --- a/ArcFormats/ScenePlayer/ImagePMP.cs +++ b/ArcFormats/ScenePlayer/ImagePMP.cs @@ -48,11 +48,10 @@ namespace GameRes.Formats.ScenePlayer public override ImageMetaData ReadMetaData (IBinaryStream stream) { - int first = stream.ReadByte() ^ 0x21; + int first = stream.PeekByte() ^ 0x21; if (first != 0x78) // doesn't look like zlib stream return null; - stream.Position = 0; using (var input = new XoredStream (stream.AsStream, 0x21, true)) using (var zstream = new ZLibStream (input, CompressionMode.Decompress)) using (var bmp = new BinaryStream (zstream, stream.Name))