From a84b72324115e1c3625753990d6c772ccf7bdb24 Mon Sep 17 00:00:00 2001 From: alemidev Date: Fri, 12 Nov 2021 01:41:02 +0100 Subject: [PATCH] ugh --- compiler/proto.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/proto.py b/compiler/proto.py index 17907f8..59ca132 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -55,11 +55,9 @@ def mctype(slot_type:Any) -> Type: if isinstance(slot_type, list): name = slot_type[0] if name == "buffer": - data = slot_type[1] - if data["countType"] == "varint": - return ByteArray - elif data["countType"] == "integer": + if "countType" in slot_type[1] and slot_type[1]["countType"] == "integer": return IntegerByteArray + return ByteArray # TODO composite data types return TrailingByteArray