Fix encoded_size #defines for oneof messages.

The sizes are represented as EncodedSize() instances, which cause
max() operation to sort them by address instead of value. This caused
pretty much random item to be selected for the maximum.

Update issue 141
Status: FixedInGit
This commit is contained in:
Petteri Aimonen
2015-01-23 21:29:29 +02:00
parent 0286a0746a
commit d32d04ba10
4 changed files with 76 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
# Regression test for issue 141: wrong encoded size #define for oneof messages
Import("env")
env.NanopbProto("testproto")
env.Object('testproto.pb.c')
env.Match(['testproto.pb.h', 'testproto.expected'])