Manually inputting Lvl Min/Max values outside of difficulty scale crashes the app
Closed this issue · 2 comments
Summary:
Manually inputting Lvl Min/Max values outside of difficulty scale (1-19) crashes the app
Steps to reproduce:
- Open Card Draw Options
- Do either of the following:
- Change the value of Lvl Min to a number higher than Lvl Max and greater than 19
- Clear the Lvl Max field altogether
- Enter a plus or minus character in either field
- Screen goes blank (or displays stack trace in development mode)
Error message:
Error: [Blueprint] clamp: max cannot be less than min
Additional notes:
I don't think it's a common scenario, but it might be inconvenient for someone to reload the entire page if they accidentally trigger this. Not sure of a good solution for this. (Pop up error message? Auto change value? Block manual input altogether?)
Aha, great find. I used to have logic to constrain the value of manual inputs in the controls, but it got lost in the journey from free input to a big slider and back to free inputs again (I decided the slider hurt usability)
That should be trivial to fix by manually clamping the value before setting it