(PrefixStream.Read): changed underlying stream position reset logic.

This commit is contained in:
morkt 2015-03-05 17:40:13 +04:00
parent bc3e1bc2d9
commit f703789685

View File

@ -86,11 +86,11 @@ namespace GameRes.Formats
read += header_count; read += header_count;
offset += header_count; offset += header_count;
count -= header_count; count -= header_count;
if (count > 0)
m_stream.Position = 0;
} }
if (count > 0) if (count > 0)
{ {
if (m_header.Length == m_position)
m_stream.Position = 0;
int stream_read = m_stream.Read (buffer, offset, count); int stream_read = m_stream.Read (buffer, offset, count);
m_position += stream_read; m_position += stream_read;
read += stream_read; read += stream_read;