mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-17 23:46:10 +00:00
Default placement added the 100 px gap to the rightmost board's right edge in i32, editing a board subtracted its old position from the new one in i32, and exporting negated the board's origin, so a board at an i32 extreme overflowed (a panic in checked builds, a wrapped position or content offset in release). Rects were also built with Rect::from_xywh, which clamps the far edge and silently shrank boards past i32::MAX. Board rects are now built in i64 and checked, so a rect with any edge outside i32 is a bad-params error naming it; default placement with no room on the right asks for an explicit x; a move whose offset needs more than 32 bits is rejected unless moveContents is false; and export reports a board at i32::MIN instead of negating it. All checks run before the document changes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>