From 2e5bc1461a9ec941d26793837a3ac717259db86c Mon Sep 17 00:00:00 2001 From: cgd Date: Sat, 16 Nov 1996 23:10:06 +0000 Subject: [PATCH] panic with "bogus size" if ncols or nrows is <= (not just <) 0 --- sys/arch/alpha/wscons/wscons_emul.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/arch/alpha/wscons/wscons_emul.c b/sys/arch/alpha/wscons/wscons_emul.c index 807f72868f6e..04b8e65785ac 100644 --- a/sys/arch/alpha/wscons/wscons_emul.c +++ b/sys/arch/alpha/wscons/wscons_emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: wscons_emul.c,v 1.5 1996/11/13 21:13:41 cgd Exp $ */ +/* $NetBSD: wscons_emul.c,v 1.6 1996/11/16 23:10:06 cgd Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -55,8 +55,9 @@ wscons_emul_attach(we, wo) if (wo->wo_ef == NULL) panic("wscons_emul_attach: bogus emul functions"); #endif - if (wo->wo_nrows < 0 || wo->wo_ncols < 0) - panic("wscons_emul_attach: bogus size"); + if (wo->wo_nrows <= 0 || wo->wo_ncols <= 0) + panic("wscons_emul_attach: bogus size (%d/%d)", + wo->wo_nrows, wo->wo_ncols); if (wo->wo_crow < 0 || wo->wo_ccol < 0 || wo->wo_crow >= wo->wo_nrows || wo->wo_ccol >= wo->wo_ncols) panic("wscons_emul_attach: bogus location (n: %d/%d, c: %d/%d",