aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2016-06-20 17:19:25 +0300
committerEli Zaretskii2016-06-20 17:19:25 +0300
commit5f375723216bdf0519316db1d2acf464b80a708f (patch)
tree34c13bd0e7096b294355bc57b3b1246a718b23f6 /src
parente5e886d12f3eff3102916c82a5aa82e0db714579 (diff)
downloademacs-5f375723216bdf0519316db1d2acf464b80a708f.tar.gz
emacs-5f375723216bdf0519316db1d2acf464b80a708f.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c
index db602f538c9..2fb5b1d5194 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1099,7 +1099,7 @@ add_env (char **env, char **new_env, char *string)
1099 char *p = *ep, *q = string; 1099 char *p = *ep, *q = string;
1100 while (ok) 1100 while (ok)
1101 { 1101 {
1102 if (*q != *p) 1102 if (*p && *q != *p)
1103 break; 1103 break;
1104 if (*q == 0) 1104 if (*q == 0)
1105 /* The string is a lone variable name; keep it for now, we 1105 /* The string is a lone variable name; keep it for now, we