mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 12:00:59 +00:00
wire: convert to bytearray every time
This commit is contained in:
parent
90c4480bf6
commit
02d615ff06
@ -116,8 +116,7 @@ Pass report payloads as `memoryview` for cheaper slicing.
|
||||
if len(msg_footer) < _MSG_FOOTER_LEN:
|
||||
data_tail = yield # read report with the rest of checksum
|
||||
footer_tail = data_tail[:_MSG_FOOTER_LEN - len(msg_footer)]
|
||||
if isinstance(msg_footer, memoryview):
|
||||
msg_footer = bytearray(msg_footer)
|
||||
msg_footer = bytearray(msg_footer)
|
||||
msg_footer.extend(footer_tail)
|
||||
|
||||
data_checksum, = parse_message_footer(msg_footer)
|
||||
|
Loading…
Reference in New Issue
Block a user