mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 12:04:51 +00:00
Make sure that FileList is not empty. fixes bug #884.
svn path=/trunk/; revision=18382
This commit is contained in:
parent
30a95cc3af
commit
0f30dcfddd
1 changed files with 12 additions and 2 deletions
|
@ -535,7 +535,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
||||||
|
|
||||||
while (_istspace (*line))
|
while (_istspace (*line))
|
||||||
line++;
|
line++;
|
||||||
if(!_tcsncmp (line, _T("rd "), 3) || !_tcsncmp (line, _T("cd "), 3))
|
if(!_tcsnicmp (line, _T("rd "), 3) || !_tcsnicmp (line, _T("cd "), 3))
|
||||||
ShowAll = FALSE;
|
ShowAll = FALSE;
|
||||||
|
|
||||||
/* Copy the string, str can be edited and orginal should not be */
|
/* Copy the string, str can be edited and orginal should not be */
|
||||||
|
@ -645,7 +645,17 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
||||||
|
|
||||||
}while(FindNextFile(hFile,&file));
|
}while(FindNextFile(hFile,&file));
|
||||||
|
|
||||||
|
/* Check the size of the list to see if we
|
||||||
|
found any matches */
|
||||||
|
if(FileListSize == 0)
|
||||||
|
{
|
||||||
|
_tcscpy(strOut,szOrginal);
|
||||||
|
CloseHandle(hFile);
|
||||||
|
if(FileList != NULL)
|
||||||
|
free(FileList);
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
/* Sort the files */
|
/* Sort the files */
|
||||||
qsort(FileList,FileListSize,sizeof(FileName), compare);
|
qsort(FileList,FileListSize,sizeof(FileName), compare);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue