aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index 751398dbd0..efda8c3716 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -4595,12 +4595,15 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
curr_len -= 2;
curr_offset += 2;
- if (link_dir == P2P_DIR_DL && (prot == 0x0023 || prot == 0x0024))
+ if (link_dir == P2P_DIR_DL && (prot == 0x0023 || prot == 0x0024)) {
proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length2, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &e_len);
- else
+ curr_len -= 2;
+ curr_offset += 2;
+ } else {
proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length, tvb, curr_offset, 1, ENC_NA, &e_len);
- curr_len -= 1;
- curr_offset += 1;
+ curr_len -= 1;
+ curr_offset += 1;
+ }
switch (prot)
{