Module Name:    src
Committed By:   christos
Date:           Tue Mar 22 01:38:17 UTC 2016

Modified Files:
        src/lib/libedit: terminal.c

Log Message:
put back NUL check (Ingo Schwarze)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libedit/terminal.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libedit/terminal.c
diff -u src/lib/libedit/terminal.c:1.23 src/lib/libedit/terminal.c:1.24
--- src/lib/libedit/terminal.c:1.23	Wed Mar  2 14:24:20 2016
+++ src/lib/libedit/terminal.c	Mon Mar 21 21:38:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: terminal.c,v 1.23 2016/03/02 19:24:20 christos Exp $	*/
+/*	$NetBSD: terminal.c,v 1.24 2016/03/22 01:38:17 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)term.c	8.2 (Berkeley) 4/30/95";
 #else
-__RCSID("$NetBSD: terminal.c,v 1.23 2016/03/02 19:24:20 christos Exp $");
+__RCSID("$NetBSD: terminal.c,v 1.24 2016/03/22 01:38:17 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -378,7 +378,7 @@ terminal_alloc(EditLine *el, const struc
          */
 	tlen = 0;
 	for (tmp = tlist; tmp < &tlist[T_str]; tmp++)
-		if (*tmp != NULL && *tmp != *str) {
+		if (*tmp != NULL && **tmp != '\0' && *tmp != *str) {
 			char *ptr;
 
 			for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++)

Reply via email to