[PATCH] shlwapi: Handle PathCanonicalize with too long paths

Robert Shearman rob at codeweavers.com
Fri Feb 29 05:09:46 CST 2008


Marcus Meissner wrote:
> lpszPath)
>    {
>      WCHAR szPath[MAX_PATH];
>      WCHAR szBuff[MAX_PATH];
> -    MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
> +    DWORD le = GetLastError();
> +    int ret = MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
> +
> +    if (!ret) {
> +	FIXME("Failed to convert string to widechar (too long?), LE %d.\n", GetLastError());
> +	SetLastError (le); /* failure does not change Lasterror, see testcase. */
> +	return FALSE;
> +    }
>   

Hi Marcus,

FIXME should be used for unimplemented functionality, not for 
highlighting application bugs that will happen on Windows too. WARN 
would be more appropriate here.

-- 
Rob Shearman




More information about the wine-devel mailing list