mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
A stroke in a project file may name any f64 for its size and points. The dab turned them into grid indexes and a snapshot margin with bare casts: a position past the grid saturated to usize::MAX, wrapped negative as an isize, slipped past the emptiness check and underflowed the snapshot bounds; the margin and the dirty-rect padding overflowed too. The indexes are now clamped to the grid before the casts and the margins saturate. The new test fails without the change (attempt to subtract with overflow at liquify.rs:496). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>