diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-12-07 00:15:44 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-12-07 00:15:44 +0000 |
commit | d268d2de98ec5d330ef19c84410c24eee2e9d13f (patch) | |
tree | 6cd67628dbbb2bf9284c0a72c902e46a4d05bf8c /usr.bin/make/var.c | |
parent | 00287d5bb61fb6e6385f456d1aff3a56a5d4da41 (diff) |
Forgot to copy end of name in nested variable names, so that
${BC_${A}} worked but not ${${A}_BC}.
Noticed by fries@
Diffstat (limited to 'usr.bin/make/var.c')
-rw-r--r-- | usr.bin/make/var.c | 5 |
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; |