summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-11-06 14:34:43 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-11-06 14:34:43 +0000
commit3385430bf2f59f131bc847761a3d94c417f4a235 (patch)
tree83ecbe8ef89d459ebf1b2c1cc202415743b20c0e /usr.bin
parentcd0b0aa2ea5894c7b4e0eea44acd702433c4c31a (diff)
Bug-fix: when expanding a specific variable v in $A,
check that v is PRECISELY A. Other BSDs, take notice.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/var.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index 472df73451f..da1c844e612 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.12 1999/09/28 21:57:04 espie Exp $ */
+/* $OpenBSD: var.c,v 1.13 1999/11/06 14:34:42 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: var.c,v 1.12 1999/09/28 21:57:04 espie Exp $";
+static char rcsid[] = "$OpenBSD: var.c,v 1.13 1999/11/06 14:34:42 espie Exp $";
#endif
#endif /* not lint */
@@ -2207,7 +2207,7 @@ Var_Subst (var, str, ctxt, undefErr)
int expand;
for (;;) {
if (str[1] != '(' && str[1] != '{') {
- if (str[1] != *var) {
+ if (str[1] != *var || var[1] != '\0') {
Buf_AddBytes(buf, 2, (Byte *) str);
str += 2;
expand = FALSE;