A minor logic bug caused the first PD in the list of PDs to be ignored
and not to be added to the decoder list the user has access to.
I.e., one of the available decoders couldn't be used at all in PulseView.
This fixes bug #164.
{
GSList *l = g_slist_sort(g_slist_copy(
(GSList*)srd_decoder_list()), decoder_name_cmp);
- while ((l = l->next)) {
+ do {
QAction *const action = parent->addAction(QString(
((srd_decoder*)l->data)->name));
action->setData(qVariantFromValue(l->data));
_decoders_add_mapper.setMapping(action, action);
connect(action, SIGNAL(triggered()),
&_decoders_add_mapper, SLOT(map()));
- }
+ } while ((l = l->next));
g_slist_free(l);
}