This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bump version for 5.29.1
[perl5.git] / win32 / vdir.h
index b5c6bc6..9ff225e 100644 (file)
@@ -203,7 +203,8 @@ int VDir::SetDirA(char const *pPath, int index)
 void VDir::FromEnvA(char *pEnv, int index)
 {   /* gets the directory for index from the environment variable. */
     while (*pEnv != '\0') {
-       if ((pEnv[0] == '=') && (DriveIndex(pEnv[1]) == index)) {
+       if ((pEnv[0] == '=') && (DriveIndex(pEnv[1]) == index)
+            && pEnv[2] == ':' && pEnv[3] == '=') {
            SetDirA(&pEnv[4], index);
            break;
        }
@@ -215,7 +216,8 @@ void VDir::FromEnvA(char *pEnv, int index)
 void VDir::FromEnvW(WCHAR *pEnv, int index)
 {   /* gets the directory for index from the environment variable. */
     while (*pEnv != '\0') {
-       if ((pEnv[0] == '=') && (DriveIndex((char)pEnv[1]) == index)) {
+       if ((pEnv[0] == '=') && (DriveIndex((char)pEnv[1]) == index)
+            && pEnv[2] == ':' && pEnv[3] == '=') {
            SetDirW(&pEnv[4], index);
            break;
        }