PR/19781: Thomas Klausner: make error message not helpful on unclosed ${var:foo

This commit is contained in:
christos 2003-05-22 18:20:10 +00:00
parent 0d9cf0359a
commit 11dc6dfd26

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.71 2003/03/14 05:19:43 thorpej Exp $ */
/* $NetBSD: var.c,v 1.72 2003/05/22 18:20:10 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: var.c,v 1.71 2003/03/14 05:19:43 thorpej Exp $";
static char rcsid[] = "$NetBSD: var.c,v 1.72 2003/05/22 18:20:10 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: var.c,v 1.71 2003/03/14 05:19:43 thorpej Exp $");
__RCSID("$NetBSD: var.c,v 1.72 2003/05/22 18:20:10 christos Exp $");
#endif
#endif /* not lint */
#endif
@ -2010,7 +2010,7 @@ Var_Parse(char *str, GNode *ctxt, Boolean err, int *lengthPtr,
* Skip initial colon while putting it back.
*/
*tstr++ = ':';
while (*tstr != endc) {
while (*tstr && *tstr != endc) {
char *newStr; /* New value to return */
char termc; /* Character which terminated scan */