summaryrefslogtreecommitdiffstats
path: root/lib/libedit
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-03-22 11:10:57 +0000
committerschwarze <schwarze@openbsd.org>2016-03-22 11:10:57 +0000
commitfcbc4fc7e1282d122970c43b77c862e9647bec8b (patch)
treefc1445962dcac7c61c07bf637f756e7ee2bf37c5 /lib/libedit
parentsync (diff)
downloadwireguard-openbsd-fcbc4fc7e1282d122970c43b77c862e9647bec8b.tar.xz
wireguard-openbsd-fcbc4fc7e1282d122970c43b77c862e9647bec8b.zip
Fix an obvious typo in a NUL check;
bug reported by David Binderman http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=50880 fix suggested by me, NetBSD rev. 1.23 and rev. 1.24.
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/terminal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libedit/terminal.c b/lib/libedit/terminal.c
index 22602ce19f4..54f80bdc36c 100644
--- a/lib/libedit/terminal.c
+++ b/lib/libedit/terminal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: terminal.c,v 1.9 2016/03/20 23:48:27 schwarze Exp $ */
+/* $OpenBSD: terminal.c,v 1.10 2016/03/22 11:10:57 schwarze Exp $ */
/* $NetBSD: terminal.c,v 1.17 2016/02/15 15:35:03 christos Exp $ */
/*-
@@ -363,7 +363,7 @@ terminal_alloc(EditLine *el, const struct termcapstr *t, const char *cap)
*/
tlen = 0;
for (tmp = tlist; tmp < &tlist[T_str]; tmp++)
- if (*tmp != NULL && *tmp != '\0' && *tmp != *str) {
+ if (*tmp != NULL && **tmp != '\0' && *tmp != *str) {
char *ptr;
for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++)