1
0
Fork 0
forked from len0rd/rockbox

fixed propfonts bug which was related to illegal memory accesing of lcd_bitmap function called by lcd_clearrect.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1158 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Felix Arends 2002-06-24 15:24:28 +00:00
parent 5bee7a490f
commit 3bce07ff62

View file

@ -644,10 +644,19 @@ void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny,
bool clear)
{
unsigned char *dst;
unsigned char *dst2 = &display[x][y/8];
unsigned char *dst2;
unsigned int data, mask, mask2, mask3, mask4;
int shift = y & 7;
int shift;
if (((unsigned)x >= LCD_WIDTH) || ((unsigned)y >= LCD_HEIGHT))
return;
if (((unsigned)(x + nx)) >= LCD_WIDTH)
nx = LCD_WIDTH - x;
if (((unsigned)(y + ny)) >= LCD_HEIGHT)
ny = LCD_HEIGHT - y;
shift = y & 2;
dst2 = &display[x][y/8];
ny += shift;
/* Calculate bit masks */