From eab07320b502ebbbc3b6d7bc6441f2b2073a4fc9 Mon Sep 17 00:00:00 2001 From: alemidev Date: Fri, 10 Dec 2021 12:44:47 +0100 Subject: [PATCH] oops fix for ArrayType --- compiler/proto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/proto.py b/compiler/proto.py index c7faadc..31a51be 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -123,7 +123,7 @@ def mctype(slot_type:Any) -> Ref: return Ref('IntegerByteArray') return Ref('ByteArray') elif t == "array": # Generic array - return Ref('ArrayType', mctype(v["type"]), (mctype(v["countType"]) if "countType" in v else 'VarInt')) + return Ref('ArrayType', mctype(v["type"]), (mctype(v["countType"]) if "countType" in v else Ref('VarInt'))) elif t == "container": # Struct return Ref('StructType', Ref(", ".join(format_tuple((p["name"], mctype(p["type"]))) for p in v if "name" in p))) # some fields are anonymous??? elif t == "option": # Optional