mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
(ArcStream.ReadHeader): throw exception on EOF.
This commit is contained in:
parent
7b4b755e17
commit
3e8718d6c3
@ -556,7 +556,11 @@ namespace GameRes
|
||||
long position = m_start + m_header_size;
|
||||
m_header_size += m_view.Read (position, m_header, m_header_size, (uint)(size - m_header_size));
|
||||
}
|
||||
size = Math.Min (size, m_header_size);
|
||||
if (size > m_header_size)
|
||||
{
|
||||
Position = m_header_size;
|
||||
throw new EndOfStreamException();
|
||||
}
|
||||
Position = size;
|
||||
return new CowArray<byte> (m_header, 0, size);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user