Skip to content

Commit

Permalink
Ensure settings saved in SWITCH_ARRAY are properly aligned with setti…
Browse files Browse the repository at this point in the history
…ngs in NVRAM
  • Loading branch information
yogh333 committed Jun 21, 2024
1 parent acb8726 commit 599146a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ledger_device_sdk/src/nbgl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ unsafe fn settings_callback(token: ::core::ffi::c_int, _index: u8, _page: ::core
let mut switch_values: [u8; SETTINGS_SIZE] = data.get_ref().clone();
switch_values[setting_idx] = !switch_values[setting_idx];
data.update(&switch_values);
SWITCH_ARRAY[setting_idx].initState = !SWITCH_ARRAY[setting_idx].initState;
SWITCH_ARRAY[setting_idx].initState = switch_values[setting_idx] as nbgl_state_t;
}
}

Expand Down

0 comments on commit 599146a

Please sign in to comment.