From: Mathieu Pilato Date: Fri, 31 Mar 2023 10:16:24 +0000 (+0200) Subject: rdtech-tc: Fix feed creation loop condition X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=fd2a8a5056aabd4231a1b0f3c72c70dab8207f26;p=libsigrok.git rdtech-tc: Fix feed creation loop condition [ gsi: Amends commit b3df76683179. ] --- diff --git a/src/hardware/rdtech-tc/api.c b/src/hardware/rdtech-tc/api.c index 3b5f1c71..ae86fccf 100644 --- a/src/hardware/rdtech-tc/api.c +++ b/src/hardware/rdtech-tc/api.c @@ -81,7 +81,7 @@ static GSList *rdtech_tc_scan(struct sr_dev_driver *di, sdi->conn = serial; devc->feeds = g_malloc0(devc->channel_count * sizeof(devc->feeds[0])); - for (i = 0; devc->channels[i].name; i++) { + for (i = 0; i < devc->channel_count; i++) { pch = &devc->channels[i]; ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, pch->name); feed = feed_queue_analog_alloc(sdi, 1, pch->digits, ch);