]> code.delx.au - gnu-emacs/commitdiff
Fix removal of variables from process-environment
authorEli Zaretskii <eliz@gnu.org>
Mon, 20 Jun 2016 14:19:25 +0000 (17:19 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 20 Jun 2016 14:19:25 +0000 (17:19 +0300)
* src/callproc.c (add_env): Fix comparison of a variable with a
value against the same variable without a value.  (Bug#23779)

src/callproc.c

index db602f538c95014d383f6f5f2c755085539aec46..2fb5b1d5194dd4acee1032381b98c6ec195df1e1 100644 (file)
@@ -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