From 6c90e824c4e8f54c71645b63b1ea33b1e028cb97 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Tue, 1 Apr 2014 16:47:53 +0300 Subject: Fix compile error when default value given for extension field. Update issue 111 Status: FixedInGit --- generator/nanopb_generator.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'generator') diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index c32b26ad..0660d20e 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -351,6 +351,8 @@ class Field: result += '0)' elif self.pbtype in ['BYTES', 'STRING'] and self.allocation != 'STATIC': result += '0)' # Arbitrary size default values not implemented + elif self.rules == 'OPTEXT': + result += '0)' # Default value for extensions is not implemented else: result += '&%s_default)' % (self.struct_name + self.name) -- cgit 1.2.3-korg