fluke-dmm: definitely use CR as line terminator

This commit is contained in:
Bert Vermeulen 2012-09-23 00:03:24 +02:00
parent acd29accb3
commit f46a36ad80
1 changed files with 1 additions and 1 deletions

View File

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