Commit 443e9884 authored by hybrid's avatar hybrid

Changed error message.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2309 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ca07a704
...@@ -1340,18 +1340,19 @@ void C3DSMeshFileLoader::readVertices(io::IReadFile* file, ChunkData& data) ...@@ -1340,18 +1340,19 @@ void C3DSMeshFileLoader::readVertices(io::IReadFile* file, ChunkData& data)
#endif #endif
data.read += sizeof(CountVertices); data.read += sizeof(CountVertices);
s32 vertexBufferByteSize = CountVertices * sizeof(f32) * 3; const s32 vertexBufferByteSize = CountVertices * sizeof(f32) * 3;
if (data.header.length - data.read != vertexBufferByteSize) if (data.header.length - data.read != vertexBufferByteSize)
{ {
os::Printer::log("Invalid size of vertices found in 3ds file.", ELL_WARNING); os::Printer::log("Invalid size of vertices found in 3ds file", core::stringc(CountVertices), ELL_ERROR);
return; return;
} }
Vertices = new f32[CountVertices * 3]; Vertices = new f32[CountVertices * 3];
file->read(Vertices, vertexBufferByteSize); file->read(Vertices, vertexBufferByteSize);
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
for (int i=0;i<CountVertices*3;i++) Vertices[i] = os::Byteswap::byteswap(Vertices[i]); for (int i=0;i<CountVertices*3;i++)
Vertices[i] = os::Byteswap::byteswap(Vertices[i]);
#endif #endif
data.read += vertexBufferByteSize; data.read += vertexBufferByteSize;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment