}
}
- int compare(const void *arg1,const void *arg2)
+ int __cdecl compare(const void *arg1,const void *arg2)
{
FileName * File1;
FileName * File2;
while (_istspace (*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;
/* Copy the string, str can be edited and orginal should not be */
}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 */
qsort(FileList,FileListSize,sizeof(FileName), compare);