TomThorpe / TTRangeSlider

A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.
MIT License
968 stars 203 forks source link

Please fix divide by 0 #45

Open kthacker7 opened 8 years ago

kthacker7 commented 8 years ago

In TTRangeSlider.m, line 315, you have:

if (self.enableStep && self.step>=0.0f){ _selectedMinimum = roundf(self.selectedMinimum/self.step)_self.step; _selectedMaximum = roundf(self.selectedMaximum/self.step)_self.step; }

If self.step == 0.0, then there is a divide by zero setting selectMinimum and selectMaximum to NaN. Hope this helped.