]> sigrok.org Git - libsigrok.git/blobdiff - src/dmm/bm86x.c
dmm/bm86x: improve robustness of secondary display parsing
[libsigrok.git] / src / dmm / bm86x.c
index ea260d8f97180869cfa6441696be549a476323da..442e5cca038e2238dfc7c9f1ba41a943a5679856 100644 (file)
@@ -302,6 +302,8 @@ static void brymen_bm86x_parse(const uint8_t *buf, float *floatval,
                        NULL, &temp_unit, NULL, 0x80);
                ret = brymen_bm86x_parse_digits(&buf[9], 4, txtbuf,
                        floatval, NULL, &digits, 0x10);
+               if (ret != SR_OK)
+                       return;
 
                /* SI unit. */
                if (buf[14] & 0x08) {