mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-30 04:37:29 -06:00
Versioned content can hold three alternatives: newer files write a Dimension tool group, the same group again after `%AI17_Alternate_Content_if_version_gt:…` for a version in between, then plain art after `%AI17_Alternate_Content`. The reader skipped from the plain `Alternate_Content` marker only, so the middle alternative was read as art too and those objects came in twice. The reader now reads the first alternative and skips from the next one, whatever its marker, to the end of the block, nested blocks included. A block that doesn't end is read whole with a note instead of failing the file. The palette reader tracked alternatives with one flag that a block nested in an alternative reset; it now tracks the depth.