diff --git a/misc/commdlg.c b/misc/commdlg.c index ad7c7171d9b..5c82b6bbefc 100644 --- a/misc/commdlg.c +++ b/misc/commdlg.c @@ -1589,6 +1589,8 @@ short WINAPI GetFileTitle32A(LPCSTR lpFile, LPSTR lpTitle, UINT32 cbBuf) i++; break; } + if (i == -1) + i++; TRACE(commdlg,"---> '%s' \n", &lpFile[i]); len = strlen(lpFile+i)+1;