X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Frdtech-tc%2Fapi.c;h=eacd17d3bb104f0af15992b86850b8322dbf192b;hb=HEAD;hp=3b5f1c71e2dac4e8f1d497ff8aacebd9cb755044;hpb=15ceaf9da051f1eb2bcefdfda8630cdfd8b32e79;p=libsigrok.git 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);