mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 05:35:34 +08:00
(Tmr-Hiro): additional check for scripts decryption.
This commit is contained in:
parent
21412980bf
commit
80be3b1c78
@ -124,7 +124,7 @@ namespace GameRes.Formats.TmrHiro
|
|||||||
int record_count = arc.File.View.ReadInt32 (entry.Offset);
|
int record_count = arc.File.View.ReadInt32 (entry.Offset);
|
||||||
var data = arc.File.View.ReadBytes (entry.Offset, entry.Size);
|
var data = arc.File.View.ReadBytes (entry.Offset, entry.Size);
|
||||||
int pos = 4;
|
int pos = 4;
|
||||||
for (int i = 0; i < record_count; ++i)
|
for (int i = 0; i < record_count && pos + 2 <= data.Length; ++i)
|
||||||
{
|
{
|
||||||
int chunk_size = LittleEndian.ToUInt16 (data, pos) - 4;
|
int chunk_size = LittleEndian.ToUInt16 (data, pos) - 4;
|
||||||
pos += 6;
|
pos += 6;
|
||||||
|
Loading…
Reference in New Issue
Block a user