Fix bug in DosChangeDirectory.


svn path=/branches/ntvdm/; revision=59701
This commit is contained in:
Aleksandar Andrejevic 2013-08-11 21:07:09 +00:00
parent 5921c465db
commit f86c0161e0

View file

@ -892,10 +892,16 @@ BOOLEAN DosChangeDirectory(LPSTR Directory)
}
/* Get the directory part of the path */
Path = strchr(Directory, '\\') + 1;
Path = strchr(Directory, '\\');
if (Path != NULL)
{
/* Skip the backslash */
Path++;
}
/* Set the directory for the drive */
strcpy(CurrentDirectories[DriveNumber], Path);
if (Path != NULL) strcpy(CurrentDirectories[DriveNumber], Path);
else strcpy(CurrentDirectories[DriveNumber], "");
/* Return success */
return TRUE;