Commit 4eeed942 authored by hybrid's avatar hybrid

Merged revision 4510-4533 from 1.8 branch. X mesh loader fix

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4534 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 28267596
...@@ -2269,6 +2269,8 @@ void CXMeshFileLoader::readUntilEndOfLine() ...@@ -2269,6 +2269,8 @@ void CXMeshFileLoader::readUntilEndOfLine()
u16 CXMeshFileLoader::readBinWord() u16 CXMeshFileLoader::readBinWord()
{ {
if (P>=End)
return 0;
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
const u16 tmp = os::Byteswap::byteswap(*(u16 *)P); const u16 tmp = os::Byteswap::byteswap(*(u16 *)P);
#else #else
...@@ -2281,6 +2283,8 @@ u16 CXMeshFileLoader::readBinWord() ...@@ -2281,6 +2283,8 @@ u16 CXMeshFileLoader::readBinWord()
u32 CXMeshFileLoader::readBinDWord() u32 CXMeshFileLoader::readBinDWord()
{ {
if (P>=End)
return 0;
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
const u32 tmp = os::Byteswap::byteswap(*(u32 *)P); const u32 tmp = os::Byteswap::byteswap(*(u32 *)P);
#else #else
......
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