rit128x96: correctly check for out-of-bounds pixels in lcd_start_blit().
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Apr 2010 09:17:09 +0000 (09:17 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Apr 2010 09:17:09 +0000 (09:17 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3524 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/lcd_rit128x96.c

index 9fce45c5f467a6a2bbc8a908d6e3114e4dcb05a0..03140ba5b43f41665fa7e4a4971c430186bd53d4 100644 (file)
@@ -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();