From 7e39c75b4243949b30ceeca71f2c4f66ff1c78f8 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 20 Dec 1999 03:52:29 +0000 Subject: [PATCH] If lpTitle==NULL and cbBuf==0 then we must return the required buffer size. --- dlls/commdlg/filetitle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/commdlg/filetitle.c b/dlls/commdlg/filetitle.c index 98ca2d0eea4..682ad4d9b7a 100644 --- a/dlls/commdlg/filetitle.c +++ b/dlls/commdlg/filetitle.c @@ -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);