From: Eli Zaretskii Date: Mon, 20 Jun 2016 14:19:25 +0000 (+0300) Subject: Fix removal of variables from process-environment X-Git-Tag: emacs-25.1-rc1~77 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/5f375723216bdf0519316db1d2acf464b80a708f 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) --- diff --git a/src/callproc.c b/src/callproc.c index db602f538c..2fb5b1d519 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -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