A range check bug in QwtScaleDiv::setTicks() and QwtScaleDiv::ticks()
Hello,
I noticed there are bugs in these functions (qwt_scale_div.cpp) in Qwt SVN:
QwtScaleDiv::setTicks():
if ( type >= 0 || type < NTickTypes )
should be
if ( type >= 0 && type < NTickTypes )
QwtScaleDiv::ticks():
same here.
Cheers and thanks for the awesome library!
Alexander
Re: A range check bug in QwtScaleDiv::setTicks() and QwtScaleDiv::ticks()
What does it change on charts?
Re: A range check bug in QwtScaleDiv::setTicks() and QwtScaleDiv::ticks()
I don't think it changes anything.
It just introduces a possible out-of-bounds error, if the API user is not careful enough.