mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(KAAS): fixed image header interpreter.
This commit is contained in:
parent
b3ccb3cd50
commit
ebd6578dca
@ -79,7 +79,7 @@ namespace GameRes.Formats.KAAS
|
|||||||
var file_len = stream.Length;
|
var file_len = stream.Length;
|
||||||
uint comp_size1 = LittleEndian.ToUInt32 (header, 8);
|
uint comp_size1 = LittleEndian.ToUInt32 (header, 8);
|
||||||
uint comp_size2 = LittleEndian.ToUInt32 (header, 12);
|
uint comp_size2 = LittleEndian.ToUInt32 (header, 12);
|
||||||
uint comp_size3 = LittleEndian.ToUInt16 (header, 16);
|
uint comp_size3 = (uint)(file_len - (0x12 + comp_size1 + comp_size2));
|
||||||
if (comp_size1 >= file_len || comp_size2 >= file_len || comp_size3 >= file_len)
|
if (comp_size1 >= file_len || comp_size2 >= file_len || comp_size3 >= file_len)
|
||||||
return null;
|
return null;
|
||||||
return new PicMetaData
|
return new PicMetaData
|
||||||
|
Loading…
Reference in New Issue
Block a user