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

CFileSystem: Fix signed integer conversion on MinGW #291

Merged
merged 2 commits into from
Feb 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 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 hFile;
#endif

// uintptr_t is optional but supported by MinGW since 2007 or earlier.
uintptr_t hFile;
sfan5 marked this conversation as resolved.
Show resolved Hide resolved
struct _tfinddata_t c_file;
if( (hFile = _tfindfirst( _T("*"), &c_file )) != -1L )
if( (hFile = _tfindfirst( _T("*"), &c_file )) != (uintptr_t)(-1L) )
{
do
{
Expand Down
Loading