X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Foutput_vcd.c;h=eea2f0e5bcd1997ee21b28f86e8f8a8bfe0d0110;hb=340f6e7aeaf0c6cbbb27c5b535787bd09407994b;hp=d8ce6ef063e9ad53eb068916d8505c9d5f8d0705;hpb=fbe2f7945d70500f6db374956a36d7bb131b09d5;p=libsigrok.git diff --git a/output/output_vcd.c b/output/output_vcd.c index d8ce6ef0..eea2f0e5 100644 --- a/output/output_vcd.c +++ b/output/output_vcd.c @@ -61,12 +61,15 @@ static int init(struct output *o) if (!(ctx = calloc(1, sizeof(struct context)))) return SIGROK_ERR_MALLOC; + o->internal = ctx; ctx->num_enabled_probes = 0; + for (l = o->device->probes; l; l = l->next) { probe = l->data; - if (probe->enabled) - ctx->probelist[ctx->num_enabled_probes++] = probe->name; + if (!probe->enabled) + continue; + ctx->probelist[ctx->num_enabled_probes++] = probe->name; } ctx->probelist[ctx->num_enabled_probes] = 0;