summaryrefslogtreecommitdiff
path: root/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'flash.c')
-rw-r--r--flash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/flash.c b/flash.c
index 0e05caa..70286d6 100644
--- a/flash.c
+++ b/flash.c
@@ -306,6 +306,13 @@ hdrlengthok:
static int readUserBlock(FlashStruct *mem)
{
+ // put the default values into the the struct;
+ // what should happen here is that if we load
+ // a smaller struct from disk it will replace
+ // the top part and leave the defaults for newly
+ // added values at the end
+ initFlashValues(mem);
+
// try to unfreeze the main file
if (persistence_unfreeze(MAINFILE, mem, sizeof(*mem), 0)) {
return sizeof(*mem);