- Fixed the return value in SearchPathW.

svn path=/trunk/; revision=4274
This commit is contained in:
Hartmut Birr 2003-03-09 21:39:17 +00:00
parent 1768a37e66
commit 8716ed6781

View file

@ -1,4 +1,4 @@
/* $Id: dir.c,v 1.34 2003/02/16 18:56:04 hbirr Exp $ /* $Id: dir.c,v 1.35 2003/03/09 21:39:17 hbirr Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -615,7 +615,8 @@ SearchPathW (
lpPath = EnvironmentBufferW; lpPath = EnvironmentBufferW;
} }
retCode = RtlDosSearchPath_U ((PWCHAR)lpPath, (PWCHAR)lpFileName, (PWCHAR)lpExtension, nBufferLength, lpBuffer, lpFilePart); retCode = RtlDosSearchPath_U ((PWCHAR)lpPath, (PWCHAR)lpFileName, (PWCHAR)lpExtension,
nBufferLength * sizeof(WCHAR), lpBuffer, lpFilePart);
if (EnvironmentBufferW != NULL) if (EnvironmentBufferW != NULL)
{ {
@ -625,7 +626,7 @@ SearchPathW (
{ {
SetLastError(ERROR_FILE_NOT_FOUND); SetLastError(ERROR_FILE_NOT_FOUND);
} }
return retCode; return retCode / sizeof(WCHAR);
} }
/* EOF */ /* EOF */