mirror of
https://github.com/storytold/craft-anything.git
synced 2026-11-21 15:00:49 +01:00
Android resource packages with a nonzero typeIdOffset published the unshifted type byte, so a package with offset 3 and local string type 1 reported 0x7f010000 instead of 0x7f040000, and packages sharing a package ID could seem to define the same resources. The offset is now read from package headers of 288 bytes or more and added, checked, to public type and resource IDs, while type names are still looked up by the local ID. Legacy 284-byte headers keep an offset of zero. An oversized offset, or a shifted type outside the one-byte field, marks the result partial with a warning and leaves valid sibling types readable.