--- trunk/reactos/lib/kernel32/file/curdir.c 2005-01-28 19:11:22 UTC (rev 13353)
+++ trunk/reactos/lib/kernel32/file/curdir.c 2005-01-28 19:28:24 UTC (rev 13354)
@@ -308,7 +308,7 @@
if (nBufferLength < Value->Length / sizeof(WCHAR) + 2)
Length++;
- if (lpBuffer != NULL)
+ if (nBufferLength >= Value->Length /sizeof(WCHAR) + 1)
{
if (nBufferLength < Value->Length / sizeof(WCHAR) + 2)
{
@@ -324,6 +324,9 @@
lpBuffer[Value->Length / sizeof(WCHAR)] = L'\\';
lpBuffer[Value->Length / sizeof(WCHAR) + 1] = 0;
}
+ } else if (nBufferLength > 0)
+ {
+ lpBuffer[0] = L'\0';
}
return Length;