From: Bert Vermeulen Date: Sun, 9 Sep 2012 20:49:07 +0000 (+0200) Subject: agilent-dmm: fix AC/DC mode detection X-Git-Tag: dsupstream~701 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e066c32a252f4e5cd881a270adb98b004e688427;p=libsigrok.git agilent-dmm: fix AC/DC mode detection --- diff --git a/hardware/agilent-dmm/sched.c b/hardware/agilent-dmm/sched.c index 68880660..9f9174f3 100644 --- a/hardware/agilent-dmm/sched.c +++ b/hardware/agilent-dmm/sched.c @@ -324,8 +324,8 @@ SR_PRIV int agdmm_conf_recv(const struct sr_dev_inst *sdi, GMatchInfo *match) sr_dbg("agilent-dmm: unknown first argument"); g_free(mstr); - if (g_match_info_get_match_count(match) == 3) { - mstr = g_match_info_fetch(match, 1); + if (g_match_info_get_match_count(match) == 4) { + mstr = g_match_info_fetch(match, 3); /* Third value, if present, is always AC or DC. */ if (!strcmp(mstr, "AC")) devc->cur_mqflags |= SR_MQFLAG_AC;