From 4a6580726ec2a0b71d8f01133d5c38a469eac497 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Thu, 26 Feb 2015 17:33:36 +0200 Subject: Fix generator error when long_names:false is combined with Oneofs. Update issue 147 Status: FixedInGit --- generator/nanopb_generator.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'generator') diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 4c01502c..7ee06523 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -587,6 +587,9 @@ class OneOf(Field): self.name = oneof_desc.name self.ctype = 'union' self.fields = [] + self.allocation = 'ONEOF' + self.default = None + self.rules = 'ONEOF' def add_field(self, field): if field.allocation == 'CALLBACK': -- cgit 1.2.3-korg