Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
CFileSystem: Fix signed integer conversion on MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker authored Feb 18, 2024
1 parent 45ace61 commit 2bb2d3f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions source/Irrlicht/CFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 2bb2d3f

Please sign in to comment.