iamandi / nanopb

Automatically exported from code.google.com/p/nanopb
zlib License
0 stars 0 forks source link

pb_decode with empty message type, but non-empty message fails #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an empty message type and generate code for it
2. Decode a valid, non-empty message against the empty message type
3. pb_decode returns false

What is the expected output? What do you see instead?
Normally, pb_decode will skip unknown fields in a message and return true.
But not in this case.

What version of the product are you using? On what operating system?
Problem exists in current HEAD of master.

Please provide any additional information below.
Patch with fix attached.

Original issue reported on code.google.com by kryhorc...@xeralux.com on 16 Jul 2013 at 1:16

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks!

Test case added: a01856f4ab7f51f129dda7387acca8a63d039105
Fix committed: 3c10e6fa71cbee85c540c0702a5a95333cd3be32

Original comment by Petteri.Aimonen on 16 Jul 2013 at 8:10

GoogleCodeExporter commented 9 years ago
Fix included in nanopb-0.2.2

Original comment by Petteri.Aimonen on 18 Aug 2013 at 7:17