diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-01-30 00:07:57 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-01-30 00:07:57 +0000 |
commit | 2afe999c21444c05a61ac1a2a214889a45f14684 (patch) | |
tree | 4c9e2c92cb2dad20493e5565707da70668e6a0ae /ui | |
parent | b48fb53c7ecd09c1ed014e8e75b509b7ca51b6ec (diff) |
Copy over r47277 from ui/gtk.
svn path=/trunk/; revision=47364
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/byte_view_tab.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp index a47402a65b..d9fa9877de 100644 --- a/ui/qt/byte_view_tab.cpp +++ b/ui/qt/byte_view_tab.cpp @@ -98,7 +98,13 @@ void ByteViewTab::protoTreeItemChanged(QTreeWidgetItem *current) { /* In the hex view, only highlight the target bytes or string. The entire field can then be displayed by clicking on any of the bytes in the field. */ if (cap_file_->hex) { - f_len = (int)strlen(cap_file_->sfilter)/2; + const char *p = cap_file_->sfilter; + f_len = 0; + while (*p) { + if (g_ascii_isxdigit(*p++)) + f_len++; + } + f_len = (f_len + 1) / 2; } else { f_len = (int)strlen(cap_file_->sfilter); } |