fixed crash with zero height for drawBox(), issue #236
This commit is contained in:
parent
0b0a64faed
commit
a045aceb91
|
@ -45,12 +45,12 @@ void u8g2_DrawBox(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y, u8g2_uint_t w, u8g
|
|||
if ( u8g2_IsIntersection(u8g2, x, y, x+w, y+h) == 0 )
|
||||
return;
|
||||
#endif /* U8G2_WITH_INTERSECTION */
|
||||
do
|
||||
while( h != 0 )
|
||||
{
|
||||
u8g2_DrawHVLine(u8g2, x, y, w, 0);
|
||||
y++;
|
||||
h--;
|
||||
} while( h != 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ GCCBINPATH:=/usr/bin/
|
|||
# Project Information
|
||||
|
||||
# The name for the project
|
||||
TARGETNAME:=u8x8_test
|
||||
TARGETNAME:=u8g2_rtc
|
||||
|
||||
# The source files of the project
|
||||
CSRC:=$(wildcard *.c)
|
||||
|
|
Loading…
Reference in New Issue