lvgl / lv_demos

Examples, tutorials and applications for the LVGL embedded GUI library
https://lvgl.io
488 stars 366 forks source link

prevent "modulo 0" operation #110

Closed peter-rounce closed 3 years ago

peter-rounce commented 3 years ago

added a min==max guard clause, to prevent a "modulo 0" operation which is undefined and may cause a divide-by-zero exception

this was discovered while running the demo in the Windows Visual Studio simulator: https://github.com/lvgl/lv_sim_visual_studio

embeddedt commented 3 years ago

Makes sense. Thanks!