diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-09-07 19:49:00 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-09-07 19:49:00 +0300 |
commit | cdbf51db08d86ea024605078f21e8c61fe0e5fd3 (patch) | |
tree | 22dfad0e12c5b4a3c0a925b507bc598151b36ef6 | |
parent | d0299d87ec109c83480f857d2a1ce66d52834926 (diff) |
Fix compilation error with generated initializers for repeated pointer fields
-rwxr-xr-x | generator/nanopb_generator.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 56dfdb08..9ffed03a 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -596,6 +596,8 @@ class Message: else: parts.append(field.get_initializer(null_init)) elif field.allocation == 'POINTER': + if field.rules == 'REPEATED': + parts.append('0') parts.append('NULL') elif field.allocation == 'CALLBACK': if field.pbtype == 'EXTENSION': |