From 461f5667777514e6921ec1a53ca3d023a2a6a092 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Wed, 25 Jan 2023 17:59:05 +0100 Subject: [PATCH] fix(core/bootloader): fix detection of installed firmware [no changelog] --- core/embed/bootloader/messages.c | 2 +- core/embed/bootloader_ci/messages.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/embed/bootloader/messages.c b/core/embed/bootloader/messages.c index 621564c10d..eab9c771b9 100644 --- a/core/embed/bootloader/messages.c +++ b/core/embed/bootloader/messages.c @@ -549,7 +549,7 @@ int process_msg_FirmwareUpload(uint8_t iface_num, uint32_t msg_size, FIRMWARE_IMAGE_MAGIC, FIRMWARE_IMAGE_MAXSIZE); if (current_hdr != - (const image_header *)FIRMWARE_START + current_vhdr.hdrlen) { + (const image_header *)(FIRMWARE_START + current_vhdr.hdrlen)) { is_new = sectrue; } } diff --git a/core/embed/bootloader_ci/messages.c b/core/embed/bootloader_ci/messages.c index 8aee331717..c2e0c92e6a 100644 --- a/core/embed/bootloader_ci/messages.c +++ b/core/embed/bootloader_ci/messages.c @@ -546,7 +546,7 @@ int process_msg_FirmwareUpload(uint8_t iface_num, uint32_t msg_size, FIRMWARE_IMAGE_MAGIC, FIRMWARE_IMAGE_MAXSIZE); if (current_hdr != - (const image_header *)FIRMWARE_START + current_vhdr.hdrlen) { + (const image_header *)(FIRMWARE_START + current_vhdr.hdrlen)) { is_new = sectrue; } }