diff options
Diffstat (limited to 'generator')
-rw-r--r-- | generator/nanopb_generator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 5ef4ab7a..5366f1bd 100644 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -186,7 +186,7 @@ class Field: return cmp(self.tag, other.tag) def __str__(self): - if self.rules == 'OPTIONAL': + if self.rules == 'OPTIONAL' and self.allocation == 'STATIC': result = ' bool has_' + self.name + ';\n' elif self.rules == 'REPEATED' and self.allocation == 'STATIC': result = ' size_t ' + self.name + '_count;\n' |