aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-epl.c
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph.schlosser@br-automation.com>2017-09-28 13:08:06 +0200
committerAnders Broman <a.broman58@gmail.com>2017-09-28 15:36:00 +0000
commit9cb1892f387a7cfdb8fd0aee64bbe7d6842fc40d (patch)
treebd057dbb5fbb8fad45f0fc8e608c30b41fba90d1 /epan/dissectors/packet-epl.c
parentf0e12f0fd301476378719d8268f13d53b14aaf1b (diff)
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 <christoph@schlosser.xyz> Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-epl.c')
-rw-r--r--epan/dissectors/packet-epl.c12
1 files changed, 6 insertions, 6 deletions
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 */