~martijnbraam/bare-py

5baf1a56744934c296f8a8bf289dbb25aeaff7c0 — Martijn Braam 4 months ago 5fc77f7 master
Fix the latest parsing error
1 files changed, 2 insertions(+), 2 deletions(-)

M bare/__init__.py
M bare/__init__.py => bare/__init__.py +2 -2
@@ 124,10 124,10 @@ def _unpack_primitive(primitive, data, offset):
    elif primitive.type == TypeKind.F64:
        return struct.unpack_from('<d', data, offset)[0], offset + 8
    elif primitive.type == TypeKind.Bool:
        temp = struct.unpack_from('<B', data, offset)[0], offset + 1
        temp = struct.unpack_from('<B', data, offset)[0]
        if temp > 1:
            raise ValueError("Encountered bool set field with an invalud value at {}".format(offset))
        return temp == 1
        return temp == 1, offset + 1
    elif primitive.type == TypeKind.Void:
        return None, offset
    elif primitive.type == TypeKind.String or primitive.type == TypeKind.Data: