Skip to content

Commit

Permalink
Merge pull request #339 from Dmitry-Me/properFixGccSignCompare
Browse files Browse the repository at this point in the history
Proper fix gcc -Wsign-compare
  • Loading branch information
leethomason committed May 25, 2015
2 parents c879a4d + ca86a0f commit 735ce51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tinyxml2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
return _errorID;
}

if ( (size_t)filelength >= (size_t)-1 ) {
if ( (unsigned long)filelength >= (size_t)-1 ) {
// Cannot handle files which won't fit in buffer together with null terminator
SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 );
return _errorID;
Expand Down

0 comments on commit 735ce51

Please sign in to comment.