if (sr_scpi_get_double(scpi, NULL, &devc->measurement) != SR_OK)
return FALSE;
+ /* Check for overflow. */
+ if (devc->measurement >= 9.998e+9)
+ devc->measurement = INFINITY;
+
/*
* This is necessary to get the actual range for the encoding digits.
* Must be called after reading the value, because it resets the