From: Bert Vermeulen Date: Sat, 22 Sep 2012 22:03:24 +0000 (+0200) Subject: fluke-dmm: definitely use CR as line terminator X-Git-Tag: dsupstream~682 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f46a36ad801bc96754183e8aa1cc2a8c0583ae33;p=libsigrok.git fluke-dmm: definitely use CR as line terminator --- diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index b81ea420..3b3d3f7b 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -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;