fixed MIO header eof condition.

This commit is contained in:
morkt 2016-03-04 06:21:46 +04:00
parent 48b6747c4c
commit 1ef4c2f58f

View File

@ -97,10 +97,10 @@ namespace GameRes.Formats.Entis
throw new InvalidFormatException(); throw new InvalidFormatException();
m_stream_pos = 0x50 + section.Length; m_stream_pos = 0x50 + section.Length;
int header_size = (int)section.Length; int header_size = (int)section.Length;
while (header_size > 8) while (header_size > 0x10)
{ {
section = erif.ReadSection(); section = erif.ReadSection();
header_size -= 8; header_size -= 0x10;
if (section.Length <= 0 || section.Length > header_size) if (section.Length <= 0 || section.Length > header_size)
break; break;
if ("SoundInf" == section.Id) if ("SoundInf" == section.Id)