summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2016-05-25 18:03:33 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2016-05-25 18:05:05 +0300
commitf7e4f36b7c991cc976124d6b5c250ffdac19244f (patch)
treed14d6edb7c73faba99ae4592a1cfbe706c80387d /generator
parent70699f3b0354fc717270c5a614ed65d9a60341f2 (diff)
Fix error in STATIC_ASSERT with multiple files (issue #203)
The FieldMaxSize class was reusing the same list instance, causing problems when multiple files were specified on the protoc command line.
Diffstat (limited to 'generator')
-rwxr-xr-xgenerator/nanopb_generator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index 501affa0..84f5d094 100755
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -217,7 +217,7 @@ class FieldMaxSize:
self.worst = worst
self.worst_field = field_name
- self.checks = checks
+ self.checks = list(checks)
def extend(self, extend, field_name = None):
self.worst = max(self.worst, extend.worst)