Skip to content

fix align check for 2019.4.x#364

Open
AXiX-official wants to merge 2 commits intoK0lb3:masterfrom
AXiX-official:2019.4.x_align_fix
Open

fix align check for 2019.4.x#364
AXiX-official wants to merge 2 commits intoK0lb3:masterfrom
AXiX-official:2019.4.x_align_fix

Conversation

@AXiX-official
Copy link
Contributor

prev impl has problem with uncompressed blocksInfo, if blocksInfo is not compressed, align_data may contains part of 16-bytes data hash on the beginning of uncompressed blocksInfo data. and wich would be all zero most of times, leading to wrong judge.

align_data = reader.read((16 - pre_align % 16) % 16)
    if any(align_data):
        reader.Position = pre_align
    else:
        self._uses_block_alignment = True

i tested serveral unity 2019.4.x bundle, for 2019.4.15 and higher, header.version should be 7 and with align
data.unity3d.zip(2019.4.14 and 2019.4.15)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant