Added sanity check to better differentiate between other DAT files

This commit is contained in:
Michael Becker 2014-06-04 15:17:29 -04:00
parent b31831b8fd
commit d60d41fa2a

View File

@ -48,7 +48,16 @@ namespace UniversalEditor.DataFormats.FileSystem.TroikaGames.Arcanum
for (uint i = 0; i < FA; i++)
{
uint fileNameSize = br.ReadUInt32();
string fileName = br.ReadFixedLengthString(fileNameSize);
string fileName = String.Empty;
try
{
fileName = br.ReadFixedLengthString(fileNameSize);
}
catch (OverflowException ex)
{
throw new InvalidDataFormatException();
}
fileName = fileName.TrimNull();
uint unknown1 = br.ReadUInt32();