From 8986ce3844ea3c6f8ef7bb99177380024f6fe05e Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 16 Jan 2018 12:06:31 +0400 Subject: [PATCH] (ANT): use ReadUInt8 method instead of ReadByte. --- ArcFormats/StudioEgo/ImageANT.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ArcFormats/StudioEgo/ImageANT.cs b/ArcFormats/StudioEgo/ImageANT.cs index c48cdff9..41cf612b 100644 --- a/ArcFormats/StudioEgo/ImageANT.cs +++ b/ArcFormats/StudioEgo/ImageANT.cs @@ -57,15 +57,11 @@ namespace GameRes.Formats.Ego { while (dst < pixels.Length) { - int a = stream.ReadByte(); - if (-1 == a) - throw new EndOfStreamException(); - else if (0 == a) + byte a = stream.ReadUInt8(); + if (0 == a) { - int count = stream.ReadByte(); - if (-1 == count) - throw new EndOfStreamException(); - else if (0 == count) + byte count = stream.ReadUInt8(); + if (0 == count) break; dst += count * 4; }