diff --git a/src/scpi/scpi.c b/src/scpi/scpi.c index f743f64d..f87bf9eb 100644 --- a/src/scpi/scpi.c +++ b/src/scpi/scpi.c @@ -448,9 +448,9 @@ SR_PRIV int sr_scpi_get_data(struct sr_scpi_dev_inst *scpi, return SR_ERR; } else if (len > 0) { laststart = g_get_monotonic_time(); - offset += len; - g_string_set_size(response, offset); } + offset += len; + g_string_set_size(response, offset); elapsed_ms = (g_get_monotonic_time() - laststart) / 1000; if (elapsed_ms >= scpi->read_timeout_ms) { sr_err("Timed out waiting for SCPI response.");