can't believe I didn't notice this bug waaaayy earlier

This commit is contained in:
Michael Becker 2020-03-30 02:11:32 -04:00
parent 89a5c528fc
commit 1e33cb7e86
No known key found for this signature in database
GPG Key ID: 389DFF5D73781A12

View File

@ -29,6 +29,8 @@ namespace UniversalEditor.DataFormats.FileSystem.ElectronicArts
string header = br.ReadFixedLengthString(4);
if (header != "BIGF") throw new InvalidDataFormatException("File does not start with BIGF");
br.Endianness = IO.Endianness.BigEndian;
uint archiveSize = br.ReadUInt32();
uint fileCount = br.ReadUInt32();
uint firstFileOffset = br.ReadUInt32();
@ -41,10 +43,9 @@ namespace UniversalEditor.DataFormats.FileSystem.ElectronicArts
uint length = br.ReadUInt32();
string filename = br.ReadNullTerminatedString();
File file = new File();
file.Name = filename;
File file = fsom.AddFile(filename);
file.Source = new EmbeddedFileSource(br, offset, length);
fsom.Files.Add(file);
file.Size = length;
}
}