From 9cb1892f387a7cfdb8fd0aee64bbe7d6842fc40d Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Thu, 28 Sep 2017 13:08:06 +0200 Subject: epl: fix od_idx display in tree The idx value was set to the sod_index value when the previous value of idx was still needed to correctly set the text of the proto item. Change-Id: I1130678aaf5f623ab30814310ac14360d13b84b7 Reviewed-on: https://code.wireshark.org/review/23770 Reviewed-by: Christoph Schlosser Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-epl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'epan/dissectors/packet-epl.c') diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c index 62ef9d36be..0147b94f6b 100644 --- a/epan/dissectors/packet-epl.c +++ b/epan/dissectors/packet-epl.c @@ -4367,13 +4367,13 @@ dissect_epl_sdo_command_write_multiple_by_index(struct epl_convo *convo, proto_t else col_append_str(pinfo->cinfo, COL_INFO, "."); - if (sod_index != error) - idx = sod_index; - dataoffset += 2; proto_item_append_text(psf_od_tree, " Idx: 0x%04X", idx); + if (sod_index != error) + idx = sod_index; + /* get subindex offset */ subindex = tvb_get_guint8(tvb, dataoffset); subobj = subobject_lookup(obj, subindex); @@ -4517,12 +4517,12 @@ dissect_epl_sdo_command_write_multiple_by_index(struct epl_convo *convo, proto_t else col_append_str(pinfo->cinfo, COL_INFO, "."); - if (sod_index != error) - idx = sod_index; - proto_tree_add_uint_format(psf_od_tree, hf_epl_asnd_sdo_cmd_data_mapping_index, tvb, dataoffset, 2, idx,"Index: 0x%04X", idx); proto_item_append_text(psf_od_tree, " Idx: 0x%04X", idx); + if (sod_index != error) + idx = sod_index; + dataoffset += 2; /* get subindex offset */ -- cgit v1.2.3