diff --git a/epan/dissectors/packet-idn.c b/epan/dissectors/packet-idn.c index 2ba1f5055a..83ed30b6eb 100644 --- a/epan/dissectors/packet-idn.c +++ b/epan/dissectors/packet-idn.c @@ -416,11 +416,12 @@ static configuration_info *get_configuration_info(packet_info *pinfo, int channe } static int dissect_idn_dmx_sample_values(tvbuff_t *tvb, int offset, proto_tree *idn_dmx_subtree, guint16 data_size, int base) { - int i, j, l=0; + int i, j, l; short int rest; char values[MAX_BUFFER]; for(i=0; i+16<=data_size; i+=16) { + l = 0; for(j=1; j<16; j++){ l += g_snprintf(values+l, MAX_BUFFER-l, " %3d", tvb_get_guint8(tvb, offset+j)); } @@ -429,6 +430,7 @@ static int dissect_idn_dmx_sample_values(tvbuff_t *tvb, int offset, proto_tree * } rest = data_size - i; if(rest > 0) { + l = 0; for(j=0; j 0) { + l = 0; for(j=0; jsample_size == 0) { - /* TODO: log expert info error? */ - return 0; - } - int sample_size = laser_data_size/config->sample_size; proto_tree *idn_samples_tree = proto_tree_add_subtree_format(idn_tree, tvb, offset, laser_data_size, ett_data, NULL, "Samples %s", config->sample_column_string); proto_tree *idn_samples_subtree = NULL;