{
const srd_decoder_option *const opt =
(srd_decoder_option*)l->data;
- if (strcmp(opt->id, id) == 0)
+ if (strcmp(opt->id, id) == 0) {
val = opt->def;
+ break;
+ }
}
}
void DecoderOptions::setter(const char *id, GVariant *value)
{
g_variant_ref(value);
- g_hash_table_insert(_options, (void*)id, value);
+ g_hash_table_insert(_options, (void*)g_strdup(id), value);
}
} // binding