Skip to content

fix align check for 2019.4.x#364

Merged
K0lb3 merged 2 commits intoK0lb3:masterfrom
AXiX-official:2019.4.x_align_fix
Feb 19, 2026
Merged

fix align check for 2019.4.x#364
K0lb3 merged 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)

@K0lb3
Copy link
Owner

K0lb3 commented Feb 19, 2026

Thanks for investigating and fixing this.
I'm a bit surprised about the empty hashes, but somehow it's also not exactly surprising -.-'

@K0lb3 K0lb3 merged commit 5aa855a into K0lb3:master Feb 19, 2026
6 checks passed
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.

2 participants

Comments