mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(S25Opener): sort entries by offset.
This commit is contained in:
@@ -71,6 +71,7 @@ namespace GameRes.Formats.ShiinaRio
|
|||||||
dir.Add (entry);
|
dir.Add (entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dir.Sort ((a, b) => (int)(a.Offset - b.Offset));
|
||||||
for (int i = 0; i < dir.Count; ++i)
|
for (int i = 0; i < dir.Count; ++i)
|
||||||
{
|
{
|
||||||
long next_offset;
|
long next_offset;
|
||||||
@@ -78,8 +79,6 @@ namespace GameRes.Formats.ShiinaRio
|
|||||||
next_offset = file.MaxOffset;
|
next_offset = file.MaxOffset;
|
||||||
else
|
else
|
||||||
next_offset = dir[i+1].Offset;
|
next_offset = dir[i+1].Offset;
|
||||||
if (next_offset < dir[i].Offset)
|
|
||||||
return null;
|
|
||||||
dir[i].Size = (uint)(next_offset - dir[i].Offset);
|
dir[i].Size = (uint)(next_offset - dir[i].Offset);
|
||||||
}
|
}
|
||||||
return new ArcFile (file, this, dir);
|
return new ArcFile (file, this, dir);
|
||||||
|
|||||||
Reference in New Issue
Block a user