From: Petteri Aimonen Date: Wed, 25 May 2016 15:03:33 +0000 (+0300) Subject: Fix error in STATIC_ASSERT with multiple files (issue #203) X-Git-Tag: 5.0.2~186^2~72 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=f7e4f36b7c991cc976124d6b5c250ffdac19244f;p=apps%2Fagl-service-can-low-level.git 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. --- 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)