mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[RTL]: Fix a bug in RtlGetCurrentDirectory_U.
svn path=/trunk/; revision=54586
This commit is contained in:
parent
aa165b016c
commit
778d8cec8a
1 changed files with 3 additions and 3 deletions
|
@ -899,13 +899,13 @@ RtlGetCurrentDirectory_U(IN ULONG MaximumLength,
|
|||
{
|
||||
/* Call has no space for it, fail, add the trailing slash */
|
||||
RtlReleasePebLock();
|
||||
return Bytes + sizeof(L'\\');
|
||||
return Bytes + sizeof(OBJ_NAME_PATH_SEPARATOR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Check if caller does not have enough space */
|
||||
if (MaximumLength <= Bytes)
|
||||
if (MaximumLength < Bytes)
|
||||
{
|
||||
/* Call has no space for it, fail */
|
||||
RtlReleasePebLock();
|
||||
|
@ -917,7 +917,7 @@ RtlGetCurrentDirectory_U(IN ULONG MaximumLength,
|
|||
RtlCopyMemory(Buffer, CurDirName, Bytes);
|
||||
|
||||
/* The buffer should end with a path separator */
|
||||
ASSERT(Buffer[Length - 1] == L'\\');
|
||||
ASSERT(Buffer[Length - 1] == OBJ_NAME_PATH_SEPARATOR);
|
||||
|
||||
/* Again check for our two cases (drive root vs path) */
|
||||
if ((Length <= 1) || (Buffer[Length - 2] != L':'))
|
||||
|
|
Loading…
Reference in a new issue