proto: Reset handled occurrences counter

Reset handled occurrences counter between each multi field custom
column to be able to handle configurations with occurrence set.

Change-Id: Iaa01da069b661ddbb2871370fcc9f9fde33041bb
Reviewed-on: https://code.wireshark.org/review/29427
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2018-09-05 14:20:14 +02:00
parent e4b2b4bd36
commit a1ae40f1a3
1 changed files with 3 additions and 1 deletions

View File

@ -5819,7 +5819,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
const true_false_string *tfstring;
int len, prev_len = 0, last, i, offset_r = 0, offset_e = 0;
int len, prev_len, last, i, offset_r = 0, offset_e = 0;
GPtrArray *finfos;
field_info *finfo = NULL;
header_field_info* hfinfo;
@ -5849,6 +5849,8 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
}
}
prev_len = 0; /* Reset handled occurrences */
while (hfinfo) {
finfos = proto_get_finfo_ptr_array(tree, hfinfo->id);