- [Core] Fix bug with assets parsing.

This commit is contained in:
Razmoth
2023-11-24 21:17:13 +04:00
parent 2568e4be08
commit 4c0f1ec44b
45 changed files with 725 additions and 672 deletions

View File

@@ -17,17 +17,17 @@ namespace AssetStudio
public sealed class IndexObject : NamedObject
{
public int Count;
public KeyValuePair<string, Index>[] AssetMap;
public List<KeyValuePair<string, Index>> AssetMap;
public override string Name => "IndexObject";
public IndexObject(ObjectReader reader) : base(reader)
{
Count = reader.ReadInt32();
AssetMap = new KeyValuePair<string, Index>[Count];
AssetMap = new List<KeyValuePair<string, Index>>();
for (int i = 0; i < Count; i++)
{
AssetMap[i] = new KeyValuePair<string, Index>(reader.ReadAlignedString(), new Index(reader));
AssetMap.Add(new KeyValuePair<string, Index>(reader.ReadAlignedString(), new Index(reader)));
}
}
}