From e066c32a252f4e5cd881a270adb98b004e688427 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Sun, 9 Sep 2012 22:49:07 +0200 Subject: [PATCH] agilent-dmm: fix AC/DC mode detection --- hardware/agilent-dmm/sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;