print: do not try to add an empty hex stream to PDML output for a text only hf

Bug: 10651
Change-Id: If38af2879b9a20f4755a7843f20c7327d66c95b1
Reviewed-on: https://code.wireshark.org/review/5054
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pascal Quantin 2014-11-01 22:08:44 +01:00
parent 0af4395e8d
commit 5e40aa45ca
1 changed files with 4 additions and 2 deletions

View File

@ -345,8 +345,10 @@ proto_tree_write_node_pdml(proto_node *node, gpointer data)
fprintf(pdata->fh, "\" pos=\"%d", fi->start);
}
fputs("\" value=\"", pdata->fh);
write_pdml_field_hex_value(pdata, fi);
if (fi->length > 0) {
fputs("\" value=\"", pdata->fh);
write_pdml_field_hex_value(pdata, fi);
}
if (node->first_child != NULL) {
fputs("\">\n", pdata->fh);