]> sigrok.org Git - libsigrok.git/commitdiff
More robust searching for config keys.
authorBert Vermeulen <redacted>
Mon, 27 Oct 2014 15:58:33 +0000 (16:58 +0100)
committerBert Vermeulen <redacted>
Mon, 27 Oct 2014 16:09:27 +0000 (17:09 +0100)
src/hwdriver.c

index dd22a6159cc40991591a2b029ecaa9251eab3312..f9649f0c489666a5a4c9f7f039019bf93cdb4fce 100644 (file)
@@ -562,6 +562,8 @@ SR_API const struct sr_config_info *sr_config_info_name_get(const char *optname)
        int i;
 
        for (i = 0; sr_config_info_data[i].key; i++) {
+               if (!sr_config_info_data[i].id)
+                       continue;
                if (!strcmp(sr_config_info_data[i].id, optname))
                        return &sr_config_info_data[i];
        }