Fix compiler warning in COBJMeshFileLoader

Caused by recent patches for 1.8 - which still had different parameter types in IReadFile::read

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6557 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien 2023-10-03 15:55:45 +00:00
parent 857c75f37d
commit 099f83c023

@ -67,8 +67,8 @@ IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file)
{ {
if (!file) if (!file)
return 0; return 0;
long filesize = file->getSize(); size_t filesize = file->getSize();
if (!filesize) if (filesize == 0 || filesize == -1L)
return 0; return 0;
const io::path fullName = file->getFileName(); const io::path fullName = file->getFileName();
@ -76,7 +76,7 @@ IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file)
c8* buf = new c8[filesize+1]; // plus null-terminator (some string functions used in parsing) c8* buf = new c8[filesize+1]; // plus null-terminator (some string functions used in parsing)
filesize = file->read((void*)buf, filesize); filesize = file->read((void*)buf, filesize);
if ( filesize <= 0 ) if ( filesize == 0 )
{ {
delete[] buf; delete[] buf;
return 0; return 0;