mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-18 12:38:37 +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)
|
await writer.awrite(svalue)
|
||||||
|
|
||||||
elif ftype is UnicodeType:
|
elif ftype is UnicodeType:
|
||||||
await dump_uvarint(writer, len(svalue))
|
bvalue = bytes(svalue, 'utf8')
|
||||||
await writer.awrite(bytes(svalue, 'utf8'))
|
await dump_uvarint(writer, len(bvalue))
|
||||||
|
await writer.awrite(bvalue)
|
||||||
|
|
||||||
elif issubclass(ftype, MessageType):
|
elif issubclass(ftype, MessageType):
|
||||||
counter = CountingWriter()
|
counter = CountingWriter()
|
||||||
|
Loading…
Reference in New Issue
Block a user