From 1ddb25ec3d273d3c208f60dbd528c30d18c89ff8 Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 25 Oct 2015 01:21:11 +0400 Subject: [PATCH] (IndexReader): clear entries list and path before parsing. --- ArcFormats/Bishop/ArcBSA.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArcFormats/Bishop/ArcBSA.cs b/ArcFormats/Bishop/ArcBSA.cs index dfe90591..3a716d99 100644 --- a/ArcFormats/Bishop/ArcBSA.cs +++ b/ArcFormats/Bishop/ArcBSA.cs @@ -83,6 +83,8 @@ namespace GameRes.Formats.Bishop { m_file.View.Reserve (index_offset, (uint)(m_file.MaxOffset - index_offset)); m_dir.Capacity = count; + m_dir.Clear(); + m_path.Clear(); for (int i = 0; i < count; ++i) { string name = m_file.View.ReadString (index_offset, 0x20); @@ -117,6 +119,8 @@ namespace GameRes.Formats.Bishop { m_file.View.Reserve (index_offset, (uint)(m_file.MaxOffset - index_offset)); m_dir.Capacity = count; + m_dir.Clear(); + m_path.Clear(); uint filenames_offset = index_offset + (uint)(count * 12); byte[] names_buf = new byte[m_file.MaxOffset - filenames_offset]; m_file.View.Read (filenames_offset, names_buf, 0, (uint)names_buf.Length);