CFileSystem: Fix signed integer conversion on MinGW

This commit is contained in:
SmallJoker 2024-02-18 23:45:39 +01:00 committed by GitHub
parent 45ace61007
commit 2bb2d3fe01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -745,15 +745,10 @@ IFileList* CFileSystem::createFileList()
r = new CFileList(Path, true, false);
// TODO: Should be unified once mingw adapts the proper types
#if defined(__GNUC__)
long hFile; //mingw return type declaration
#else
// intptr_t is optional but supported by MinGW since 2007 or earlier.
intptr_t hFile;
#endif
struct _tfinddata_t c_file;
if( (hFile = _tfindfirst( _T("*"), &c_file )) != -1L )
if( (hFile = _tfindfirst( _T("*"), &c_file )) != (intptr_t)(-1L) )
{
do
{