aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-05-03 22:33:51 +0000
committerBill Meier <wmeier@newsguy.com>2008-05-03 22:33:51 +0000
commit5c848fcb5770a586aaa8bbba38ab35a3fe97ecdb (patch)
tree1fc2c5d1a6b4caee2587d02f0c04b6558f04c7cb /print.c
parent0d2fd70dc66eb75d3c84e419187f2aa59a81fcb3 (diff)
Fix for bug #2518: 'tshark -Tfields -e data' Omits Last Character of Data
svn path=/trunk/; revision=25223
Diffstat (limited to 'print.c')
-rw-r--r--print.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/print.c b/print.c
index 4a24b8023f..999d0d6506 100644
--- a/print.c
+++ b/print.c
@@ -1569,9 +1569,8 @@ get_field_hex_value(GSList* src_list, field_info *fi)
p = buffer;
/* Print a simple hex dump */
for (i = 0 ; i < fi->length; i++) {
- g_snprintf(p, len, "%02x", pd[i]);
+ g_snprintf(p, chars_per_byte+1, "%02x", pd[i]);
p += chars_per_byte;
- len -= chars_per_byte;
}
return buffer;
} else {