]> sigrok.org Git - libsigrok.git/commitdiff
agilent-dmm: Set correct length in strncmp().
authorAurelien Jacobs <redacted>
Mon, 16 Jan 2017 10:45:20 +0000 (11:45 +0100)
committerAurelien Jacobs <redacted>
Sun, 22 Jan 2017 18:03:29 +0000 (19:03 +0100)
src/hardware/agilent-dmm/protocol.c

index cfbb3c310be4c72efd62200dfcbf94a6d65729e4..9122355be8fdf263b13839f4d67d1bb316ef5d9b 100644 (file)
@@ -705,7 +705,7 @@ static int recv_conf_u124x_5x(const struct sr_dev_inst *sdi, GMatchInfo *match)
                devc->cur_digits[i] = 4;
                devc->cur_encoding[i] = 5;
        } else if (!strncmp(mstr, "T1", 2) || !strncmp(mstr, "T2", 2) ||
-                  !strncmp(mstr, "TEMP", 2)) {
+                  !strncmp(mstr, "TEMP", 4)) {
                devc->cur_mq[i] = SR_MQ_TEMPERATURE;
                m2 = g_match_info_fetch(match, 2);
                if (!m2)