Open francescolavra opened 5 years ago
True, but Code size will be higher.
Well... I can add this...
A box with height 0 is still a line. For that, at least one line is required. How about changing the condition to h > 0
A box with height 0 is still a line
Why? This wouldn't be consistent with the current implementation, where a line corresponds to a box with height 1, not 0. Also, u8g_DrawBox()
doesn't draw anything when called with width 0.
If the u8g_DrawBox() function in csrc/u8g_rect.c is called with the
h
argument set to 0, it corrupts the display by drawing a box that covers the entire height of the screen. This is because the body in the while() loop inu8g_draw_box()
is executed before checking the value of theh
argument. This can be fixed by replacing thedo {} while()
construct with a simple while() loop: