Prevent infinite loading for effn ptcls

This commit is contained in:
KillzXGaming 2020-04-19 17:23:43 -04:00
parent 11099d88df
commit ab984fe93a

View file

@ -46,7 +46,7 @@ namespace FirstPlugin
FileReader reader = new FileReader(stream); FileReader reader = new FileReader(stream);
int SectionSize = 0; int SectionSize = 0;
while (true) while (!reader.EndOfStream)
{ {
string magicCheck = reader.ReadString(4, Encoding.ASCII); string magicCheck = reader.ReadString(4, Encoding.ASCII);
if (magicCheck == "VFXB") if (magicCheck == "VFXB")
@ -58,6 +58,9 @@ namespace FirstPlugin
SectionSize += 4; SectionSize += 4;
} }
if (SectionSize == reader.BaseStream.Length)
return;
DataStart = reader.getSection(0, SectionSize); DataStart = reader.getSection(0, SectionSize);
Text = FileName; Text = FileName;