PathFindNextComponent: return pointer to NULL and not NULL.

This commit is contained in:
Uwe Bonnes 2000-06-07 03:14:40 +00:00 committed by Alexandre Julliard
parent d9ac53f15a
commit 4c5af80c6a
2 changed files with 8 additions and 5 deletions

View File

@ -1242,7 +1242,8 @@ BOOL FILEDLG95_OnOpen(HWND hwnd)
WCHAR lpwstrTemp[MAX_PATH];
DWORD dwEaten, dwAttributes;
if ((lpszTemp = COMDLG32_PathFindNextComponentA(lpszTemp)))
lpszTemp = COMDLG32_PathFindNextComponentA(lpszTemp);
if (*lpszTemp)
lstrcpynAtoW(lpwstrTemp, lpszTemp1, lpszTemp - lpszTemp1);
else
{

View File

@ -2177,15 +2177,17 @@ BOOL WINAPI PathCanonicalizeW(LPWSTR pszBuf, LPCWSTR pszPath)
/*************************************************************************
* PathFindNextComponentA
*
* Windows returns a pointer NULL (BO 000605)
*/
LPSTR WINAPI PathFindNextComponentA(LPCSTR pszPath)
{
while( *pszPath )
{
if(*pszPath++=='\\')
return (LPSTR)((*pszPath)? pszPath : NULL);
return pszPath;
}
return NULL;
return pszPath;
}
/*************************************************************************
@ -2196,9 +2198,9 @@ LPWSTR WINAPI PathFindNextComponentW(LPCWSTR pszPath)
while( *pszPath )
{
if(*pszPath++=='\\')
return (LPWSTR)((*pszPath)? pszPath : NULL);
return pszPath;
}
return NULL;
return pszPath;
}
/*************************************************************************