From d704c749c5f3ab10458c112a78692705cb19cb89 Mon Sep 17 00:00:00 2001 From: yocvito Date: Sat, 18 Feb 2023 16:10:59 +0100 Subject: [PATCH] restore mac address original layout at scene exit when mac addr was not modified in bad kb bt mac config scene --- applications/main/bad_kb/scenes/bad_kb_scene_config_mac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/main/bad_kb/scenes/bad_kb_scene_config_mac.c b/applications/main/bad_kb/scenes/bad_kb_scene_config_mac.c index 4463d1c40..b330ef9f1 100644 --- a/applications/main/bad_kb/scenes/bad_kb_scene_config_mac.c +++ b/applications/main/bad_kb/scenes/bad_kb_scene_config_mac.c @@ -29,7 +29,7 @@ void bad_kb_scene_config_mac_on_enter(void* context) { bad_kb_scene_config_mac_byte_input_callback, NULL, bad_kb, - reverse_mac_addr(bad_kb->mac), + reverse_mac_addr(bad_kb->mac), GAP_MAC_ADDR_SIZE); view_dispatcher_switch_to_view(bad_kb->view_dispatcher, BadKbAppViewConfigMac); } @@ -54,4 +54,7 @@ void bad_kb_scene_config_mac_on_exit(void* context) { // Clear view byte_input_set_result_callback(bad_kb->byte_input, NULL, NULL, NULL, NULL, 0); byte_input_set_header_text(bad_kb->byte_input, ""); + + // reverse back addr (in case it didn't get modified) + reverse_mac_addr(bad_kb->mac); }