Commit 9988c38d authored by Pavel Emelyanov's avatar Pavel Emelyanov

protobuf: Fix show of nested messages in pretty format

Currently the pretty format leaks to the nested messages and
affects the way they are shown. Fix this by assuming the nested
messages to be non-pretty.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ed745fa9
...@@ -341,7 +341,7 @@ static int pb_field_show_pretty(pb_pr_ctl_t *ctl) ...@@ -341,7 +341,7 @@ static int pb_field_show_pretty(pb_pr_ctl_t *ctl)
char cookie[32]; char cookie[32];
const char *ptr; const char *ptr;
if (!ctl->pretty_fmt) if (!ctl->pretty_fmt || field->depth)
return 0; return 0;
sprintf(cookie, " %d:", field->number); sprintf(cookie, " %d:", field->number);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment