diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-06-03 20:17:49 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-06-03 20:17:49 +0000 |
commit | 4b3c52aa7b4bb2974dbb7149a6198da8d06e802a (patch) | |
tree | 271eb519213f789a9be3175c0c47d9c80b6eba3e | |
parent | 5770d332be4d6f553aa1e80f8a1fafce06e2a2f2 (diff) |
Fix check for window-top and window-left values.
ok miod@
-rw-r--r-- | sys/arch/sparc/dev/fb.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/fb.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c index 5a0786f5d79..7ca2ff43ff3 100644 --- a/sys/arch/sparc/dev/fb.c +++ b/sys/arch/sparc/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.48 2009/03/29 17:32:06 miod Exp $ */ +/* $OpenBSD: fb.c,v 1.49 2009/06/03 20:17:48 kettenis Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -378,8 +378,8 @@ fbwscons_init(struct sunfb *sf, int isconsole) * their values are consistent with the font * metrics. */ - if (wt <= 0 || wt > sf->sf_width - cols * fw || - wl <= 0 || wl > sf->sf_height - rows * fh) + if (wt <= 0 || wt > sf->sf_height - rows * fh || + wl <= 0 || wl > sf->sf_width - cols * fw) wt = wl = 0; } if (wt == 0 /* || wl == 0 */) { diff --git a/sys/arch/sparc64/dev/fb.c b/sys/arch/sparc64/dev/fb.c index ed620e9dd03..f823e887d4b 100644 --- a/sys/arch/sparc64/dev/fb.c +++ b/sys/arch/sparc64/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.21 2009/01/19 20:21:33 miod Exp $ */ +/* $OpenBSD: fb.c,v 1.22 2009/06/03 20:17:48 kettenis Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -226,8 +226,8 @@ fbwscons_init(struct sunfb *sf, int flags, int isconsole) * Make sure window-top and window-left * values are consistent with the font metrics. */ - if (wt <= 0 || wt > sf->sf_width - cols * fw || - wl <= 0 || wl > sf->sf_height - rows * fh) + if (wt <= 0 || wt > sf->sf_height - rows * fh || + wl <= 0 || wl > sf->sf_width - cols * fw) wt = wl = 0; } if (wt == 0 /* || wl == 0 */) { |