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

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

diff -u --recursive --new-file v2.1.111/linux/drivers/video/fbcon-iplan2p4.c linux/drivers/video/fbcon-iplan2p4.c
@@ -317,7 +317,7 @@
     u32 eorx, fgx, bgx, fdx;
 
     dest = p->screen_base + yy * p->fontheight * bytes + (xx>>1)*8 + (xx & 1);
-    cdat = p->fontdata + (c & 0xff) * p->fontheight;
+    cdat = p->fontdata + (c & p->charmask) * p->fontheight;
 
     fgx = expand4l(attr_fgcol(p,c));
     bgx = expand4l(attr_bgcol(p,c));
@@ -333,7 +333,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;
     u32 eorx, fgx, bgx, fdx;
@@ -352,7 +353,7 @@
 	* cache :-(
 	*/
 
-	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