Fix removal of variables from process-environment
* src/callproc.c (add_env): Fix comparison of a variable with a value against the same variable without a value. (Bug#23779)
This commit is contained in:
parent
e5e886d12f
commit
5f37572321
1 changed files with 1 additions and 1 deletions
|
@ -1099,7 +1099,7 @@ add_env (char **env, char **new_env, char *string)
|
|||
char *p = *ep, *q = string;
|
||||
while (ok)
|
||||
{
|
||||
if (*q != *p)
|
||||
if (*p && *q != *p)
|
||||
break;
|
||||
if (*q == 0)
|
||||
/* The string is a lone variable name; keep it for now, we
|
||||
|
|
Loading…
Add table
Reference in a new issue