diff --git a/bootloader/usb.c b/bootloader/usb.c index 1e2a752d9..4be378618 100644 --- a/bootloader/usb.c +++ b/bootloader/usb.c @@ -444,7 +444,7 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep) } if (brand_new_firmware || button.YesUp) { // check whether current firmware is signed - if (signatures_ok(NULL)) { + if (SIG_OK == signatures_ok(NULL)) { old_was_unsigned = false; // backup metadata backup_metadata(meta_backup); @@ -603,7 +603,7 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep) // 1) old firmware was unsigned // 2) firmware restore flag isn't set // 3) signatures are not ok - if (old_was_unsigned || (flags & 0x01) == 0 || !signatures_ok(NULL)) { + if (old_was_unsigned || (flags & 0x01) == 0 || SIG_OK != signatures_ok(NULL)) { memzero(meta_backup, sizeof(meta_backup)); } // copy new firmware header