if (lpszPath)
{
LPSTR lpszFileName = PathFindFileNameA(lpszPath);
- if(lpszFileName)
+ if(lpszFileName != lpszPath)
RtlMoveMemory(lpszPath, lpszFileName, strlen(lpszFileName)+1);
}
}
TRACE("(%s)\n", debugstr_w(lpszPath));
lpszFileName = PathFindFileNameW(lpszPath);
- if(lpszFileName)
+ if(lpszFileName != lpszPath)
RtlMoveMemory(lpszPath, lpszFileName, (strlenW(lpszFileName)+1)*sizeof(WCHAR));
}