mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Decode byte string for Python3
This commit is contained in:
parent
356fbaf904
commit
c15fc85786
@ -239,7 +239,7 @@ def consume(fmt, data, names):
|
|||||||
|
|
||||||
def cstring(string):
|
def cstring(string):
|
||||||
"""Extracts a null-terminated string from a byte array."""
|
"""Extracts a null-terminated string from a byte array."""
|
||||||
return string.split('\0', 1)[0]
|
return string.decode('utf-8').split('\0', 1)[0]
|
||||||
|
|
||||||
|
|
||||||
def compute_crc(data):
|
def compute_crc(data):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user