diff --git a/hardware/serial-dmm/protocol.c b/hardware/serial-dmm/protocol.c index d10eec26..09f74dd4 100644 --- a/hardware/serial-dmm/protocol.c +++ b/hardware/serial-dmm/protocol.c @@ -177,7 +177,7 @@ static int receive_data(int fd, int revents, int dmm, void *info, void *cb_data) } } - if (devc->num_samples >= devc->limit_samples) { + if (devc->limit_samples && devc->num_samples >= devc->limit_samples) { sr_info("Requested number of samples reached, stopping."); sdi->driver->dev_acquisition_stop(sdi, cb_data); return TRUE;