bug(assets): assert!() on bundled font parse in svg_loader.rs — startup crash risk #58
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
solitaire_engine/src/assets/svg_loader.rscallsshared_fontdb()which contains anassert!()when parsing the bundled FiraMono font bytes. If the embedded bytes are ever corrupted (truncated binary, bad asset pack) the game panics at startup with no recovery path.Affected file
solitaire_engine/src/assets/svg_loader.rsFix
Replace the
assert!()with aResult-returning function and log a warning + fall back to system fonts if the bundled font fails to parse:Relevant rule
CLAUDE.md §2.3: NO
panic!()in runtime/game logic