Skip to content

Commit 5259f86

Browse files
Fixing const error status not taken in account under if condition
(cherry picked from commit b33b54a)
1 parent 850ee33 commit 5259f86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib_stusb/src/usbd_ledger_hid_u2f.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,16 @@ USBD_StatusTypeDef USBD_LEDGER_HID_U2F_send_message(USBD_HandleTypeDef *pdev,
414414
uint8_t cmd = 0;
415415
const uint8_t *tx_buffer = message;
416416
uint16_t tx_length = message_length;
417+
#ifndef HAVE_BOLOS
418+
const uint8_t status[2] = {0x69, 0x85};
419+
#endif // !HAVE_BOLOS
417420

418421
switch (packet_type) {
419422
case OS_IO_PACKET_TYPE_USB_U2F_HID_APDU:
420423
cmd = U2F_COMMAND_MSG;
421424
// Cannot enable user presence handling in the OS, see OS issues/555 for more information
422425
#ifndef HAVE_BOLOS
423426
if ((message_length == 2) && (message[0] == 0xFF) && (message[1] == 0xFF)) {
424-
const uint8_t status[2] = {0x69, 0x85};
425427
tx_buffer = status;
426428
handle->user_presence = LEDGER_HID_U2F_USER_PRESENCE_ASKING;
427429
}

0 commit comments

Comments
 (0)