Files
MeshCore-Solo/src/helpers
jirogit 8ef369058d fix(RegionMap): distinguish clean EOF from partial read in load()
Previously load() returned true unconditionally on file-open success,
masking truncated or corrupt /regions2 files. Additionally, the first
field of each entry record (r->id) used the same success-chaining
pattern as subsequent fields, so a clean EOF at a record boundary set
success=false and would have been indistinguishable from real
corruption once the return value was fixed.

The r->id read is now split out: n==0 is a clean EOF (break, success
retains its prior value from the header read), n!=sizeof(r->id) is a
partial read or corruption (break, success=false). load() now returns
success instead of an unconditional true, so its return value reflects
the actual parse outcome.

Companion fix to #2372, which fixed the same return-true hardcoding
in save(). (#1891 originally reported this on load() but was closed
when #2372 landed — that PR only touched save(); this addresses the
load() side.)
2026-07-09 19:59:05 -07:00
..
2026-06-26 07:44:01 +10:00
2026-06-26 22:36:49 +10:00
2026-06-26 07:44:01 +10:00
2026-07-05 23:33:56 +07:00
2026-07-05 21:20:39 +07:00
2026-07-05 21:20:39 +07:00
2026-02-18 22:32:01 +07:00
2026-04-17 14:38:03 +10:00