mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
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:
parent
a7af55af93
commit
85ec8fdb1d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105865
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user