Files
craft-libs/crates
FredApps 209a40d66c craft-svg: floor declared() name window to a character boundary (#1899)
* svg: floor declared() name window to a character boundary

If the MAX_NAME+1 cut split a UTF-8 character, get(..bound).unwrap_or(rest)
fell back to scanning the entire suffix. Floor the window instead, and
when recording an overlong name extend to the next character boundary so
the key is still longer than MAX_NAME.

* test(svg): assert declared() keys stay bounded after a multibyte cut

The overlong-name refusal alone also passed on the old unwrap_or(rest)
fallback, which recorded the whole suffix. Bound recorded keys to
MAX_NAME+4 so the test fails if the suffix is stored again.
2026-11-16 11:45:10 -05:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…