mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 05:57:09 -06:00
Mask ids come unchecked from develop.merge, sidecars (lc:settings) and pastes. With a mask id of u32::MAX, next_mask_id() and Preset::apply added 1 to it: debug builds panicked, release builds wrapped to 0, so the second new mask got the same id as the first. next_mask_id() now falls back to the lowest id no mask uses when the highest is at the limit, and Preset::apply takes each preset mask's id from it instead of counting on its own, so mask.add, mask.brushStroke, mask.duplicate and presets with masks all get unused ids.