1.Problem Description
In the debug mode of the example controls, the program crashes when the color picker window is dragged to a very small size.
2.Bug causes and modification suggestions
In the HSV_SAT_INIT_0 and HSV_SAT_INIT_1 macros in the ColorConvert.cpp file, when j is equal to 1, the dividend is 0, which causes a program exception. It is recommended to modify the macro:
#define HSV_LOOP_STEPS(w) (w) - 1 to
#define HSV_LOOP_STEPS(w) ((w) != 1 ? (w) - 1 : 0.0001)
Change 0.0001 to a suitable default value.
1.Problem Description In the debug mode of the example controls, the program crashes when the color picker window is dragged to a very small size.
2.Bug causes and modification suggestions In the HSV_SAT_INIT_0 and HSV_SAT_INIT_1 macros in the ColorConvert.cpp file, when j is equal to 1, the dividend is 0, which causes a program exception. It is recommended to modify the macro:
#define HSV_LOOP_STEPS(w) (w) - 1
to#define HSV_LOOP_STEPS(w) ((w) != 1 ? (w) - 1 : 0.0001)
Change 0.0001 to a suitable default value.