summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-05-25 21:15:47 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-05-25 21:15:47 +0000
commita15a3ae99914beff9bbc57959c540c569acd5608 (patch)
tree7583ce105f92b6dd5d04bd226a4b9ea706840945 /sys/arch
parentdc338f97136fb052440d796c882e3562fd6e6e88 (diff)
Do not dereference ri_devcmap[] twice; found the hard way by Gilbert Fernandes
(firstname dot lastname at orange dot frogland).
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/loongson/dev/smfb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/loongson/dev/smfb.c b/sys/arch/loongson/dev/smfb.c
index 9530f335158..62b24eac0c5 100644
--- a/sys/arch/loongson/dev/smfb.c
+++ b/sys/arch/loongson/dev/smfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smfb.c,v 1.11 2010/12/26 15:40:59 miod Exp $ */
+/* $OpenBSD: smfb.c,v 1.12 2011/05/25 21:15:46 miod Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -543,7 +543,7 @@ smfb_erasecols(void *cookie, int row, int col, int num, long attr)
num *= f->fontwidth;
smfb_fillrect(fb, ri->ri_xorigin + col, ri->ri_yorigin + row,
- num, f->fontheight, ri->ri_devcmap[bg]);
+ num, f->fontheight, bg);
return 0;
}
@@ -569,7 +569,7 @@ smfb_eraserows(void *cookie, int row, int num, long attr)
y = ri->ri_yorigin + row * f->fontheight;
w = ri->ri_emuwidth;
}
- smfb_fillrect(fb, x, y, w, num, ri->ri_devcmap[bg]);
+ smfb_fillrect(fb, x, y, w, num, bg);
return 0;
}