Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix division by zero in GuiScrollBar function (raysan5#396)
When trying to use the floating window example, I got several times some crashes when expanding the window size. It's caused in the GuiScrollBar function, when the maxValue is equal to the minValue (I don't know if this case is intended in the first place). Because valueRange variable is maxValue minus minValue, then it is equal to 0, and triggers a crash later, when we use it in division (division by 0). I'm not sure if it's the best fix, maybe minValue == maxValue is not indentend in the first place and we should fix this problem earlier?
- Loading branch information