If lpTitle==NULL and cbBuf==0 then we must return the required buffer

size.
This commit is contained in:
Francois Gouget 1999-12-20 03:52:29 +00:00 committed by Alexandre Julliard
parent 271f522fa9
commit 7e39c75b42

View File

@ -28,7 +28,7 @@ short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, UINT cbBuf)
TRACE("(%p %p %d); \n", lpFile, lpTitle, cbBuf);
if(lpFile == NULL || lpTitle == NULL)
if(lpFile == NULL || (lpTitle == NULL && cbBuf != 0))
return -1;
len = strlen(lpFile);