mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(IndexReader): clear entries list and path before parsing.
This commit is contained in:
parent
d8a1109ddb
commit
1ddb25ec3d
@ -83,6 +83,8 @@ namespace GameRes.Formats.Bishop
|
|||||||
{
|
{
|
||||||
m_file.View.Reserve (index_offset, (uint)(m_file.MaxOffset - index_offset));
|
m_file.View.Reserve (index_offset, (uint)(m_file.MaxOffset - index_offset));
|
||||||
m_dir.Capacity = count;
|
m_dir.Capacity = count;
|
||||||
|
m_dir.Clear();
|
||||||
|
m_path.Clear();
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
string name = m_file.View.ReadString (index_offset, 0x20);
|
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_file.View.Reserve (index_offset, (uint)(m_file.MaxOffset - index_offset));
|
||||||
m_dir.Capacity = count;
|
m_dir.Capacity = count;
|
||||||
|
m_dir.Clear();
|
||||||
|
m_path.Clear();
|
||||||
uint filenames_offset = index_offset + (uint)(count * 12);
|
uint filenames_offset = index_offset + (uint)(count * 12);
|
||||||
byte[] names_buf = new byte[m_file.MaxOffset - filenames_offset];
|
byte[] names_buf = new byte[m_file.MaxOffset - filenames_offset];
|
||||||
m_file.View.Read (filenames_offset, names_buf, 0, (uint)names_buf.Length);
|
m_file.View.Read (filenames_offset, names_buf, 0, (uint)names_buf.Length);
|
||||||
|
Loading…
Reference in New Issue
Block a user