aakash-sahai / nanopb

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

Default value for enum field does not work when using long_names=false #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Modify the tests\options.proto sample file and add the following to the 
Messasge4 message:
required Enum1 enum = 2 [default = EnumValue1];

2. Generate code

What is the expected output? What do you see instead?
Expected: const Enum1 Message4_enum_default = EnumValue1;
Actual: const Enum1 Message4_enum_default = Enum1_EnumValue1;

What version of the product are you using? On what operating system?
0.1.7 on Windows

Original issue reported on code.google.com by mf2...@gmail.com on 13 Nov 2012 at 10:12

GoogleCodeExporter commented 9 years ago

Original comment by Petteri.Aimonen on 13 Nov 2012 at 10:16

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/nanopb/source/detail?r=02ecee2de89f

Original comment by Petteri.Aimonen on 13 Nov 2012 at 10:37

GoogleCodeExporter commented 9 years ago
Works beautifully - thanks for looking into this so quickly!

Original comment by mf2...@gmail.com on 14 Nov 2012 at 12:55

GoogleCodeExporter commented 9 years ago
Fixed in 0.1.8

Original comment by Petteri.Aimonen on 13 Dec 2012 at 7:35