mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 23:08:14 +00:00
core/cbor: fix string conversion to work with bytearrays
This commit is contained in:
parent
31506d81e9
commit
1ee5068128
@ -139,7 +139,7 @@ def _cbor_decode(cbor):
|
||||
return (data[0:ln], data[ln:])
|
||||
elif fb_type == _CBOR_TEXT_STRING:
|
||||
ln, data = _read_length(cbor[1:], fb_aux)
|
||||
return (data[0:ln].decode(), data[ln:])
|
||||
return (bytes(data[0:ln]).decode(), data[ln:])
|
||||
elif fb_type == _CBOR_ARRAY:
|
||||
if fb_aux == _CBOR_VAR_FOLLOWS:
|
||||
res = []
|
||||
|
Loading…
Reference in New Issue
Block a user