Some review findings.

This commit is contained in:
Kim Kulling
2018-05-31 20:15:13 +02:00
parent 8ecf3789d7
commit 339cc2e951
4 changed files with 22 additions and 17 deletions

View File

@@ -471,7 +471,10 @@ void XFileParser::ParseDataObjectMesh( Mesh* pMesh)
unsigned int numIndices = ReadInt();
Face& face = pMesh->mPosFaces[a];
for (unsigned int b = 0; b < numIndices; ++b) {
face.mIndices.push_back( ReadInt() );
const int idx( ReadInt() );
if ( idx <= numVertices ) {
face.mIndices.push_back( idx );
}
}
TestForSeparator();
}
@@ -1293,7 +1296,8 @@ unsigned int XFileParser::ReadBinDWord() {
// ------------------------------------------------------------------------------------------------
unsigned int XFileParser::ReadInt()
{
if( mIsBinaryFormat)
:
cd if( mIsBinaryFormat)
{
if( mBinaryNumCount == 0 && mEnd - mP >= 2)
{
@@ -1305,6 +1309,7 @@ unsigned int XFileParser::ReadInt()
}
--mBinaryNumCount;
const size_t len( mEnd - mP );
if ( mEnd - mP >= 4) {
return ReadBinDWord();
} else {
@@ -1340,6 +1345,7 @@ unsigned int XFileParser::ReadInt()
}
CheckForSeparator();
return isNegative ? ((unsigned int) -int( number)) : number;
}
}