Fix bug with empty strings in repeated string callbacks.

Fix suggested by Henrik Carlgren. Added also unit test for the bug.

Update issue 73
Status: FixedInGit
This commit is contained in:
Petteri Aimonen
2013-04-14 09:26:42 +03:00
parent 6a02298584
commit 9939910833
4 changed files with 23 additions and 2 deletions

View File

@@ -83,6 +83,8 @@ int main()
testmessage.fixed32value.arg = "fixed32value: %ld\n";
testmessage.fixed64value.funcs.decode = &print_fixed64;
testmessage.fixed64value.arg = "fixed64value: %lld\n";
testmessage.repeatedstring.funcs.decode = &print_string;
testmessage.repeatedstring.arg = "repeatedstring: \"%s\"\n";
if (!pb_decode(&stream, TestMessage_fields, &testmessage))
return 1;