diff options
author | Craig A. Berry <craig.a.berry@gmail.com> | 2016-02-13 09:12:01 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2016-02-13 09:23:14 -0500 |
commit | 2c2d7ae2ec598bff43f056060e4a83656066a4c4 (patch) | |
tree | 307fbab26a8794b0a81666d58bcdfa381c4932b6 | |
parent | 7098efff946437a2db6013d12c4fc3193fc328ce (diff) | |
download | perl-maint-5.20.tar.gz |
VMS patch for duplicate env entriesmaint-5.20
-rw-r--r-- | vms/vms.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1352,7 +1352,9 @@ prime_env_iter(void) if (!str$case_blind_compare(env_tables[i],&crtlenv)) { char *start; int j; - for (j = 0; environ[j]; j++) { + /* Start at the end, so if there is a duplicate we keep the first one. */ + for (j = 0; environ[j]; j++); + for (j--; j >= 0; j--) { if (!(start = strchr(environ[j],'='))) { if (ckWARN(WARN_INTERNAL)) Perl_warner(aTHX_ packWARN(WARN_INTERNAL),"Ill-formed CRTL environ value \"%s\"\n",environ[j]); |