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;
}
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;
}