graphics_rgb565.c Fixed screen size check
This commit is contained in:
parent
3096146da8
commit
b04617007d
|
|
@ -121,7 +121,7 @@ void gfx_fillScreen(color_t color)
|
||||||
|
|
||||||
void gfx_setPixel(point_t pos, color_t color)
|
void gfx_setPixel(point_t pos, color_t color)
|
||||||
{
|
{
|
||||||
if (pos.x > screen_width || pos.y > screen_height)
|
if (pos.x >= screen_width || pos.y >= screen_height)
|
||||||
return; // off the screen
|
return; // off the screen
|
||||||
|
|
||||||
buf[pos.x + pos.y*screen_width] = _true2highColor(color);
|
buf[pos.x + pos.y*screen_width] = _true2highColor(color);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue