From: Bert Vermeulen Date: Mon, 27 Oct 2014 15:58:33 +0000 (+0100) Subject: More robust searching for config keys. X-Git-Tag: libsigrok-0.4.0~825 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a700a3a4bfef6c92a2085ae5e611fabfb639878a;p=libsigrok.git More robust searching for config keys. --- diff --git a/src/hwdriver.c b/src/hwdriver.c index dd22a615..f9649f0c 100644 --- a/src/hwdriver.c +++ b/src/hwdriver.c @@ -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]; }