From 61a1253980c0260cbb15ba694c4ba93044a6d115 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 22 Oct 2016 14:05:53 +0400 Subject: [PATCH] fixed BinaryStreams. --- GameRes/BinaryStream.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/GameRes/BinaryStream.cs b/GameRes/BinaryStream.cs index a8f07737..069d4670 100644 --- a/GameRes/BinaryStream.cs +++ b/GameRes/BinaryStream.cs @@ -131,11 +131,8 @@ namespace GameRes if (!m_source.CanSeek) { m_buffer_end = m_source.Read (m_buffer, 0, 4); - if (4 == m_buffer_end) - { - uint signature = LittleEndian.ToUInt32 (m_buffer, 0); - m_signature = new Lazy (() => signature); - } + uint signature = LittleEndian.ToUInt32 (m_buffer, 0); + m_signature = new Lazy (() => signature); } else { @@ -516,7 +513,7 @@ namespace GameRes public sbyte ReadInt8 () { - return (sbyte)ReadInt8(); + return (sbyte)ReadUInt8(); } public byte ReadUInt8 ()