summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkstailey <kstailey@openbsd.org>1998-08-15 22:47:53 +0000
committerkstailey <kstailey@openbsd.org>1998-08-15 22:47:53 +0000
commit3d403125c7dc23cc7fbe00de9eb106d885c92062 (patch)
tree68d46c7d37b3ed8ed0116a2af1f88b158c92c3b8
parentBreak out locking code into its own file so it can be shared with lockspool. (diff)
downloadwireguard-openbsd-3d403125c7dc23cc7fbe00de9eb106d885c92062.tar.xz
wireguard-openbsd-3d403125c7dc23cc7fbe00de9eb106d885c92062.zip
fix kbd generated NULs from CTRL-@ and CTRL-SP
-rw-r--r--sys/dev/wscons/wscons.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/wscons/wscons.c b/sys/dev/wscons/wscons.c
index a01d15ff0ff..ea1bdffd003 100644
--- a/sys/dev/wscons/wscons.c
+++ b/sys/dev/wscons/wscons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wscons.c,v 1.6 1997/11/06 12:26:58 niklas Exp $ */
+/* $OpenBSD: wscons.c,v 1.7 1998/08/15 22:47:53 kstailey Exp $ */
/* $NetBSD: wscons.c,v 1.10 1996/12/05 01:39:47 cgd Exp $ */
/*
@@ -233,8 +233,11 @@ wscons_input(cp)
tp = sc->sc_tty;
#endif
- while (*cp)
- (*linesw[tp->t_line].l_rint)(*cp++, tp);
+ if (*cp == '\0') /* deal with kbd generated NULs */
+ (*linesw[tp->t_line].l_rint)(*cp, tp);
+ else
+ while (*cp)
+ (*linesw[tp->t_line].l_rint)(*cp++, tp);
}