]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/ftdi-la/api.c
ftdi-la: order the channels properly
[libsigrok.git] / src / hardware / ftdi-la / api.c
index cd70bb7feeeed401de5cc07cb01c6f429c3eabf6..d9936e7086b1954e8fc88fa2b1973181f7b4efd6 100644 (file)
@@ -162,7 +162,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                sdi->priv = devc;
 
                for (char *const *chan = &(desc->channel_names[0]); *chan; chan++)
-                       sr_channel_new(sdi, &(desc->channel_names[0]) - chan,
+                       sr_channel_new(sdi, chan - &(desc->channel_names[0]),
                                        SR_CHANNEL_LOGIC, TRUE, *chan);
 
                devices = g_slist_append(devices, sdi);