X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fdrv%2Flcd_rit128x96.c;h=03140ba5b43f41665fa7e4a4971c430186bd53d4;hb=888da1bd988d54b4036a8a4bfd79a52ef9fd7486;hp=9fce45c5f467a6a2bbc8a908d6e3114e4dcb05a0;hpb=c5e10eebedc888e41b55f9613c89ab7a8a25baba;p=bertos.git diff --git a/bertos/drv/lcd_rit128x96.c b/bertos/drv/lcd_rit128x96.c index 9fce45c5..03140ba5 100644 --- a/bertos/drv/lcd_rit128x96.c +++ b/bertos/drv/lcd_rit128x96.c @@ -131,7 +131,8 @@ static void lcd_start_blit(uint8_t x, uint8_t y, uint8_t width, uint8_t height) { uint8_t buffer[3]; - ASSERT(width == LCD_WIDTH && height == LCD_HEIGHT); + ASSERT((x + width) <= LCD_WIDTH); + ASSERT((y + height) <= LCD_HEIGHT); /* Enter command mode */ LCD_SET_COMMAND();