X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fscpi%2Fscpi_serial.c;h=cad41381595fb5f4739c88a9d6e7428adcfcc759;hb=aff94d065e3ef50fa022b3e79b0dc435ae2c5b0a;hp=9522c29702305948e2d90c0cbba0c2101253108c;hpb=dd7a4a71caf4a0c0a7d2a24b780cbdffd6602621;p=libsigrok.git diff --git a/src/scpi/scpi_serial.c b/src/scpi/scpi_serial.c index 9522c297..cad41381 100644 --- a/src/scpi/scpi_serial.c +++ b/src/scpi/scpi_serial.c @@ -162,7 +162,7 @@ static int scpi_serial_read_data(void *priv, char *buf, int maxlen) /* Try to read new data into the buffer if there is space. */ if (len > 0) { - ret = serial_read_nonblocking(sscpi->serial, sscpi->buffer + sscpi->read, + ret = serial_read_nonblocking(sscpi->serial, sscpi->buffer + sscpi->count, BUFFER_SIZE - sscpi->count); if (ret < 0)