mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 17:09:44 +00:00
src/protobuf: fix unicode serialization
This commit is contained in:
parent
f4c1bfda22
commit
9e5aad9ab4
@ -223,8 +223,9 @@ async def dump_message(writer, msg):
|
||||
await writer.awrite(svalue)
|
||||
|
||||
elif ftype is UnicodeType:
|
||||
await dump_uvarint(writer, len(svalue))
|
||||
await writer.awrite(bytes(svalue, 'utf8'))
|
||||
bvalue = bytes(svalue, 'utf8')
|
||||
await dump_uvarint(writer, len(bvalue))
|
||||
await writer.awrite(bvalue)
|
||||
|
||||
elif issubclass(ftype, MessageType):
|
||||
counter = CountingWriter()
|
||||
|
Loading…
Reference in New Issue
Block a user