patch-2.1.112 linux/drivers/video/fbcon-iplan2p2.c

Next file: linux/drivers/video/fbcon-iplan2p2.h
Previous file: linux/drivers/video/fbcon-ilbm.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.111/linux/drivers/video/fbcon-iplan2p2.c linux/drivers/video/fbcon-iplan2p2.c
@@ -307,7 +307,7 @@
     u16 eorx, fgx, bgx, fdx;
 
     dest = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*4 + (xx & 1);
-    cdat = p->fontdata + (c & 0xff) * p->fontheight;
+    cdat = p->fontdata + (c & p->charmask) * p->fontheight;
 
     fgx = expand2w(COLOR_2P(attr_fgcol(p,c)));
     bgx = expand2w(COLOR_2P(attr_bgcol(p,c)));
@@ -323,7 +323,8 @@
 			  const unsigned short *s, int count, int yy, int xx)
 {
     u8 *dest, *dest0;
-    u8 *cdat, c;
+    u8 *cdat;
+    u16 c;
     int rows;
     int bytes;
     u16 eorx, fgx, bgx, fdx;
@@ -335,7 +336,7 @@
     eorx = fgx ^ bgx;
 
     while (count--) {
-	c = *s++;
+	c = *s++ & p->charmask;
 	cdat  = p->fontdata + (c * p->fontheight);
 
 	for (rows = p->fontheight, dest = dest0; rows-- ; dest += bytes) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov