thellmund / Android-Week-View

Display highly customizable calendar views in your Android app
Apache License 2.0
188 stars 98 forks source link

setMinHour and setMaxHour can lead to crashes #239

Closed FeFelten closed 3 years ago

FeFelten commented 3 years ago

Describe the bug Basically their are 2 bugs:

First, if you set minHour to x and maxHour to x +1 the app crashes when creating a weekView with this values (also observed in 5.2.1 in my app). Second, similar to the first one in 5.3.0 the app crashes also for wider ranges for minHour and maxHour. (E.g. minHour = 11 and maxHour = 20 is ok, but minHour = 12 and maxHour 20 leads to a crash)

To Reproduce Use the setter methods to set the specific values and my app crashes instantly.

Additional context

thellmund commented 3 years ago

This pull request should fix the issues for now.