From: arighi Date: Tue, 27 Apr 2010 09:17:09 +0000 (+0000) Subject: rit128x96: correctly check for out-of-bounds pixels in lcd_start_blit(). X-Git-Tag: 2.5.0~384 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=fc5db93eee46b6cf45bdcdd45390bacd7de15d5b;p=bertos.git rit128x96: correctly check for out-of-bounds pixels in lcd_start_blit(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3524 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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();