diff options
author | 1999-11-06 14:34:42 +0000 | |
---|---|---|
committer | 1999-11-06 14:34:42 +0000 | |
commit | 719cacf3eb5574c98672e782eaef02ada40fcd65 (patch) | |
tree | d0b309e28d6579a40ab7b2f8de2a07622fbcdf59 | |
parent | Change Cd to openbsd syntax. (diff) | |
download | wireguard-openbsd-719cacf3eb5574c98672e782eaef02ada40fcd65.tar.xz wireguard-openbsd-719cacf3eb5574c98672e782eaef02ada40fcd65.zip |
Bug-fix: when expanding a specific variable v in $A,
check that v is PRECISELY A.
Other BSDs, take notice.
-rw-r--r-- | usr.bin/make/var.c | 6 |
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; |