summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-12-07 00:15:44 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-12-07 00:15:44 +0000
commitd268d2de98ec5d330ef19c84410c24eee2e9d13f (patch)
tree6cd67628dbbb2bf9284c0a72c902e46a4d05bf8c
parent00287d5bb61fb6e6385f456d1aff3a56a5d4da41 (diff)
Forgot to copy end of name in nested variable names, so that
${BC_${A}} worked but not ${${A}_BC}. Noticed by fries@
-rw-r--r--usr.bin/make/var.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index a2f26f36f57..0df8a9bf5ef 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.50 2000/11/24 14:29:56 espie Exp $ */
+/* $OpenBSD: var.c,v 1.51 2000/12/07 00:15:43 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -131,7 +131,7 @@
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
UNUSED
-static char rcsid[] = "$OpenBSD: var.c,v 1.50 2000/11/24 14:29:56 espie Exp $";
+static char rcsid[] = "$OpenBSD: var.c,v 1.51 2000/12/07 00:15:43 espie Exp $";
#endif
#endif /* not lint */
@@ -773,6 +773,7 @@ var_name_with_dollar(str, pos, ctxt, err, endc)
str = *pos;
for (; **pos != '$'; (*pos)++) {
if (**pos == '\0' || **pos == endc || **pos == ':') {
+ Buf_AddInterval(&buf, str, *pos);
v = VarFind(Buf_Retrieve(&buf), ctxt, FIND_ENV | FIND_MINE);
Buf_Destroy(&buf);
return v;