mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(RPA): do not prepend empty header to entries.
This commit is contained in:
parent
857f4c544b
commit
1d59b50ea1
@ -106,8 +106,11 @@ namespace GameRes.Formats.RenPy
|
||||
if (tuple.Count > 2)
|
||||
{
|
||||
entry.Header = tuple[2] as byte[];
|
||||
if (null != entry.Header)
|
||||
if (null != entry.Header && entry.Header.Length > 0)
|
||||
{
|
||||
entry.Size -= (uint)entry.Header.Length;
|
||||
entry.IsPacked = true;
|
||||
}
|
||||
}
|
||||
dir.Add (entry);
|
||||
}
|
||||
@ -124,7 +127,7 @@ namespace GameRes.Formats.RenPy
|
||||
else
|
||||
input = Stream.Null;
|
||||
var rpa_entry = entry as RpaEntry;
|
||||
if (null == rpa_entry || null == rpa_entry.Header)
|
||||
if (null == rpa_entry || null == rpa_entry.Header || 0 == rpa_entry.Header.Length)
|
||||
return input;
|
||||
return new PrefixStream (rpa_entry.Header, input);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user