tomjakubowski / nanopb

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

Parent stream not updated when decoding packed array #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a message that has a repeated field followed by a bytes field
2. Send the message with data in both fields 
3.

What is the expected output? What do you see instead?
Both fields will be decoded. Only the repeated field is decoded, then an error 
is reported.

What version of the product are you using? On what operating system?
0.1.4

Please provide any additional information below.
In pb_decode.c::decode_field(), shouldn't there be something like

stream->state = substream.state;

before the "case PB_HTYPE_ARRAY" returns?

Original issue reported on code.google.com by chadl...@gmail.com on 30 Jul 2012 at 8:58

GoogleCodeExporter commented 8 years ago
This issue was updated by revision b582bc9bf699.

Original comment by Petteri.Aimonen on 31 Jul 2012 at 4:15

GoogleCodeExporter commented 8 years ago
Thanks for the bug report, issue was exactly as described.

I also extended test cases to cover this:
http://code.google.com/p/nanopb/source/detail?r=5703ad0c55634e91157a965bbfa089a4
396f3cb5

Original comment by Petteri.Aimonen on 31 Jul 2012 at 4:16

GoogleCodeExporter commented 8 years ago
Fix included in 0.1.5

Original comment by Petteri.Aimonen on 6 Aug 2012 at 8:17