From 47e7de82874427a87a6c26fbb53d4ab9b91c55ee Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Tue, 11 Aug 2020 11:08:37 -0500 Subject: [PATCH] Fix for overpicky filename parser --- Compression.BSA/BSA/Reader/FileNameBlock.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Compression.BSA/BSA/Reader/FileNameBlock.cs b/Compression.BSA/BSA/Reader/FileNameBlock.cs index c5d6f0e6..b8644234 100644 --- a/Compression.BSA/BSA/Reader/FileNameBlock.cs +++ b/Compression.BSA/BSA/Reader/FileNameBlock.cs @@ -31,10 +31,8 @@ namespace Compression.BSA var str = names[i].ReadStringTerm(bsa.HeaderType); data = data.Slice(index + 1); } - if (data.Length > 0) - { - throw new InvalidDataException("File name block did not parse all of its data"); - } + // Data doesn't seem to need to be fully consumed. + // Official BSAs have overflow of zeros return names; }); }