diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-11-21 09:47:29 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-11-21 09:47:29 +0200 |
commit | 56f7c488df99ae655b47b5838055e48b886665a1 (patch) | |
tree | 816a30f63134cf12b52e96c7cdc16c2129e7f244 /generator | |
parent | 7af48e550f084aed929bb7db99070cb8f5d08210 (diff) |
Fix mistake in previous commit
Diffstat (limited to 'generator')
-rwxr-xr-x | generator/nanopb_generator.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 62ee41bf..0748e630 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -730,10 +730,11 @@ class OneOf(Field): return largest def encoded_size(self, dependencies): + '''Returns the size of the largest oneof field.''' largest = EncodedSize(0) for f in self.fields: size = EncodedSize(f.encoded_size(dependencies)) - if size is None: + if size.value is None: return None elif size.symbols: return None # Cannot resolve maximum of symbols |