You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 in u8g_draw_box() is executed before checking the value of the h argument.
This can be fixed by replacing the do {} while() construct with a simple while() loop:
while( h != 0 )
{
u8g_draw_hline(u8g, x, y, w);
y++;
h--;
}
The text was updated successfully, but these errors were encountered:
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 the
do {} while()
construct with a simple while() loop:The text was updated successfully, but these errors were encountered: