Files
photocraft/crates/doc
yangandClaude Opus 5.5 0954b8c065 Link Layers no longer overflows on a stored u64::MAX link group and never joins an unrelated group (#961) (#1022)
layer.linkLayers picked the new link group as max(link_group) + 1, computed even
when unlinking. A .pcraft or PSD can store u64::MAX, so the addition panicked in
checked builds and wrapped to 0 in release, where it could merge the selection
into an existing group 0.

Add Document::unused_link_group: max + 1 when it fits, otherwise the smallest
free id from 1, never wrapping. Link Layers uses it only when linking and returns
an error if no id is left. Also read the first selected group and the member
counts without indexing.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:32:30 -04:00
..
2026-09-30 05:02:08 -04:00