diff options
Diffstat (limited to 'generator/nanopb_generator.py')
-rw-r--r-- | generator/nanopb_generator.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index a6d38c0b..28268512 100644 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -218,6 +218,9 @@ class Field: result += '\n pb_membersize(%s, %s[0]),' % (self.struct_name, self.name) result += ('\n pb_membersize(%s, %s) / pb_membersize(%s, %s[0]),' % (self.struct_name, self.name, self.struct_name, self.name)) + elif self.ltype == 'PB_LTYPE_BYTES': + result += '\n pb_membersize(%s, bytes),' % self.ctype + result += ' 0,' else: result += '\n pb_membersize(%s, %s),' % (self.struct_name, self.name) result += ' 0,' |