column-utils: add space to improve readability.

In tshark the UTF8 arrow overlaps the ports.
When pcap file has more than 999 packets the output is
no more aligned.

Bug: 12502
Change-Id: I07f90bbc0d2f065458bc07b7fde8f6a651951b60
Reviewed-on: https://code.wireshark.org/review/18109
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
This commit is contained in:
Dario Lombardo 2016-10-07 15:05:15 +02:00 committed by Balint Reczey
parent b682bbd6ee
commit 61956b8bf3
2 changed files with 3 additions and 3 deletions

View File

@ -456,7 +456,7 @@ col_append_ports(column_info *cinfo, const gint col, port_type typ, guint16 src,
col_snprint_port(buf_src, 32, typ, src);
col_snprint_port(buf_dst, 32, typ, dst);
col_append_lstr(cinfo, col, buf_src, UTF8_RIGHTWARDS_ARROW, buf_dst, COL_ADD_LSTR_TERMINATOR);
col_append_lstr(cinfo, col, buf_src, " " UTF8_RIGHTWARDS_ARROW " ", buf_dst, COL_ADD_LSTR_TERMINATOR);
}
static void

View File

@ -3599,8 +3599,8 @@ print_columns(capture_file *cf)
switch (col_item->col_fmt) {
case COL_NUMBER:
column_len = col_len = strlen(col_item->col_data);
if (column_len < 3)
column_len = 3;
if (column_len < 5)
column_len = 5;
line_bufp = get_line_buf(buf_offset + column_len);
put_spaces_string(line_bufp + buf_offset, col_item->col_data, col_len, column_len);
break;