1
0

Load top-down bmp images correctly

Previously we handled all sizes as unsigned, but Windows BMP files can have negative height to signal top-down images.
No clue about left-right (would be trivial to swap as well, but found no info so far if that would be correct)

Also casting away some new compile warning in gcc for COBJMeshFileLoader


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6558 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2023-10-05 21:04:55 +00:00
parent 099f83c023
commit f06347c8b7
2 changed files with 21 additions and 5 deletions

View File

@@ -68,7 +68,7 @@ IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file)
if (!file)
return 0;
size_t filesize = file->getSize();
if (filesize == 0 || filesize == -1L)
if (filesize == 0 || filesize == (size_t)-1L)
return 0;
const io::path fullName = file->getFileName();