mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 18:26:11 +00:00
fix(prefs): update NodePrefs size tripwire after page_order growth
Growing page_order 11 → 13 bumped sizeof(NodePrefs) 2488 → 2496 (the 2 added bytes plus alignment padding to the next 8-byte boundary). Save/load/clamp and SCHEMA_SENTINEL were already updated; this syncs the static_assert. Verified with a host compile (fixed-width members → layout matches the target). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
948076560b
commit
890fc89431
@@ -436,7 +436,7 @@ struct NodePrefs { // persisted to file
|
|||||||
// 3. clamp it on load (an upgrader's file lacks it → stray bytes)
|
// 3. clamp it on load (an upgrader's file lacks it → stray bytes)
|
||||||
// 4. bump SCHEMA_SENTINEL's low byte
|
// 4. bump SCHEMA_SENTINEL's low byte
|
||||||
// (Padding can also shift sizeof; a "false" trip just means re-check + rebump.)
|
// (Padding can also shift sizeof; a "false" trip just means re-check + rebump.)
|
||||||
static_assert(sizeof(NodePrefs) == 2488,
|
static_assert(sizeof(NodePrefs) == 2496,
|
||||||
"NodePrefs layout changed — sync DataStore save/load + clamp, bump "
|
"NodePrefs layout changed — sync DataStore save/load + clamp, bump "
|
||||||
"SCHEMA_SENTINEL, then update this size (see steps above).");
|
"SCHEMA_SENTINEL, then update this size (see steps above).");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user