From f7e4f36b7c991cc976124d6b5c250ffdac19244f Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Wed, 25 May 2016 18:03:33 +0300 Subject: 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. --- generator/nanopb_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit 1.2.3-korg