* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
/* 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)