From 1784c7b8860f001488d9f9431a9519a239e537e3 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Tue, 25 Sep 2001 16:52:03 +0000 Subject: [PATCH] Integrate change #12200 from maintperl; on windows, virtualized environment could propagate deleted variables into children if they happen to be at the very end of the table p4raw-link: @12200 on //depot/maint-5.6/perl: a54e6844a84a87ee0c736e691b5bedbfcbccb5bd p4raw-id: //depot/perl@12201 p4raw-integrated: from //depot/maint-5.6/perl@12199 'merge in' win32/perlhost.h (@12146..) --- win32/perlhost.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/win32/perlhost.h b/win32/perlhost.h index 1714601..3e22dba 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -2269,11 +2269,12 @@ CPerlHost::CreateLocalEnvironmentStrings(VDir &vDir) while(lpLocalEnv) { // still have environment overrides to add - // so copy the strings into place - strcpy(lpStr, lpLocalEnv); - nLength = strlen(lpLocalEnv) + 1; - lpStr += nLength; - lpEnvPtr += nLength; + // so copy the strings into place if not an override + char *ptr = strchr(lpLocalEnv, '='); + if(ptr && ptr[1]) { + strcpy(lpStr, lpLocalEnv); + lpStr += strlen(lpLocalEnv) + 1; + } lpLocalEnv = GetIndex(dwEnvIndex); } -- 2.7.4