perf: edit arc

This commit is contained in:
ManicSteiner
2023-12-07 21:42:38 +08:00
parent dad693ca9e
commit 6efe8ad30b
2 changed files with 4 additions and 0 deletions

View File

@@ -16,6 +16,8 @@ namespace GameRes.Formats.NipponIchi
public override ArcFile TryOpen(ArcView file)
{
int count = Binary.BigEndian(file.View.ReadUInt16(6));
if (!IsSaneCount(count))
return null;
long index_offset = count * 10 + 30; //actually count*10 + 28, ignored two bytes of 000C or 000B
var dir = new List<Entry>(count);
for (int i = 0; i < count; ++i)