summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormglocker <mglocker@openbsd.org>2009-06-01 17:41:27 +0000
committermglocker <mglocker@openbsd.org>2009-06-01 17:41:27 +0000
commit85dc6f82a94b9bb5a4962d11279b674c5330d043 (patch)
treec5eaef4cb6f0a7c85e43cd20b76143f50e51deac
parentRIP; ok millert (diff)
downloadwireguard-openbsd-85dc6f82a94b9bb5a4962d11279b674c5330d043.tar.xz
wireguard-openbsd-85dc6f82a94b9bb5a4962d11279b674c5330d043.zip
Allow a font width other than 8 pixels.
-rw-r--r--sys/dev/usb/udl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index 25e72362511..d5f2d508458 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.15 2009/06/01 15:47:38 mglocker Exp $ */
+/* $OpenBSD: udl.c,v 1.16 2009/06/01 17:41:27 mglocker Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -1320,7 +1320,7 @@ udl_draw_char(struct udl_softc *sc, uint32_t x, uint32_t y,
fontbits = *fontchar;
line = (uint16_t *)buf;
- for (j = 7; j != -1; j--) {
+ for (j = (font->fontwidth - 1); j != -1; j--) {
luc = 1 << j;
if (fontbits & luc)
lrgb16 = htobe16(fg);