When expanding a specific [1-char] variable, only expand said specific

[1-char] variable.  Don't just automatically expand something which
starts with that character.

Obtained from:	OpenBSD [3 years ago!]
This commit is contained in:
Juli Mallett 2002-10-24 12:57:42 +00:00
parent a7af55af93
commit 85ec8fdb1d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105865

View file

@ -2281,7 +2281,7 @@ Var_Subst (char *var, char *str, GNode *ctxt, Boolean undefErr)
int expand;
for (;;) {
if (str[1] != '(' && str[1] != '{') {
if (str[1] != *var) {
if (str[1] != *var || val[1] != '\0') {
Buf_AddBytes(buf, 2, (Byte *) str);
str += 2;
expand = FALSE;