Commit 4c5af80c authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

PathFindNextComponent: return pointer to NULL and not NULL.

parent d9ac53f1
......@@ -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
{
......
......@@ -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;
}
/*************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment