]> sigrok.org Git - libsigrok.git/commitdiff
fluke-dmm: definitely use CR as line terminator
authorBert Vermeulen <redacted>
Sat, 22 Sep 2012 22:03:24 +0000 (00:03 +0200)
committerBert Vermeulen <redacted>
Tue, 25 Sep 2012 17:53:05 +0000 (19:53 +0200)
hardware/fluke-dmm/api.c

index b81ea4206c5738926310bfc957d358903670f055..3b3d3f7bedf353772a361af271ba0400361c03d6 100644 (file)
@@ -114,7 +114,7 @@ static int serial_readline(int fd, char **buf, int *buflen, uint64_t timeout_ms)
                if (len > 0) {
                        *buflen += len;
                        *(*buf + *buflen) = '\0';
-                       if (*buflen > 0 && *(*buf + *buflen - 1) == '\n') {
+                       if (*buflen > 0 && *(*buf + *buflen - 1) == '\r') {
                                /* Strip LF and terminate. */
                                *(*buf + --*buflen) = '\0';
                                break;