mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
Four findings from a code review pass on the Trail feature: - showAlert overlay was gated to `curr == home`, so feedback like "Tracking started", "Trail saved", "GPX N B (USB)" never rendered on the Trail screen (or QuickMsg / Settings / Auto-Advert, for that matter). Drop the gate — the overlay shows on whichever screen the caller invoked from. - TrailStore::writeTo only verified the first write; subsequent point writes could partially fail (full filesystem, mid-write power loss) and the method would still return true. Check every write return value so handleSave's "Trail saved" only fires on actual success. - gpxPoint: clamp snprintf's intended-length return against the buffer size and skip the point if gmtime returns null. Avoids any chance of out.write reading past buf[120]. - TrailScreen::_act_map sized exactly to today's 8 actions — bump to 12 so adding another popup item later doesn't cause an OOB write into the surrounding members. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>