TeamMidnightDust / MidnightLib

Common Library for Team MidnightDust's mods. Provides a config api, common utils, and cosmetics.
https://midnightdust.eu/midnightlib
MIT License
31 stars 15 forks source link

Crash if an integer inputted into the text box is greater than max int. #16

Closed MasterToster closed 1 year ago

MasterToster commented 1 year ago

As the title states. Suggested fix: i just changed the line 149 in MidnightConfig.java from value = f.apply(s); to try{ value = f.apply(s); } catch(NumberFormatException e){ return false; }

Motschen commented 1 year ago

I'll look into this, but I'll try to ensure users aren't able to input integers over the int limit in the first place.