Code Review
/
apps
/
low-level-can-service.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
49bd3f3
)
Fix the size of length prefix for messages in other files.
author
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Wed, 23 Oct 2013 18:21:43 +0000
(21:21 +0300)
committer
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Wed, 23 Oct 2013 18:21:43 +0000
(21:21 +0300)
generator/nanopb_generator.py
patch
|
blob
|
history
diff --git
a/generator/nanopb_generator.py
b/generator/nanopb_generator.py
index
ebb020b
..
0f14a04
100755
(executable)
--- a/
generator/nanopb_generator.py
+++ b/
generator/nanopb_generator.py
@@
-355,6
+355,11
@@
class Field:
# Instead of direct numeric value, reference the size that
# has been #defined in the other file.
encsize = EncodedSize(self.submsgname + 'size')
+
+ # We will have to make a conservative assumption on the length
+ # prefix size, though.
+ encsize += 5
+
elif self.enc_size is None:
raise RuntimeError("Could not determine encoded size for %s.%s"
% (self.struct_name, self.name))