Closed dirkx closed 2 years ago
An empty / nBufMax == 0 graph will cause a div-by-zero error on display update/rendering in line 300 of XGraph.h.
It may be useful to change this line to:
pBox->nPlotIndStart = pBox->nBufMax ? (pBox->nPlotIndStart % pBox->nBufMax) : 0; as the remainder is quite robust and able to display thing sensibly.
pBox->nPlotIndStart = pBox->nBufMax ? (pBox->nPlotIndStart % pBox->nBufMax) : 0;
Thank you for the correction, @dirkx I have rolled this update into the latest.
Describe the bug
An empty / nBufMax == 0 graph will cause a div-by-zero error on display update/rendering in line 300 of XGraph.h.
It may be useful to change this line to:
pBox->nPlotIndStart = pBox->nBufMax ? (pBox->nPlotIndStart % pBox->nBufMax) : 0;
as the remainder is quite robust and able to display thing sensibly.