Bugfix: removed unnecessary windows.h include from Quake3BSP loader

Bugfix: added workaround to allow reading invalid Collada files sporting negative indices into data arrays

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@824 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
ulfjorensen
2010-10-04 18:12:35 +00:00
parent 0fd0f68b26
commit 136ef7609d
2 changed files with 3 additions and 3 deletions

View File

@@ -2005,8 +2005,9 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
const char* content = GetTextContent();
while( *content != 0)
{
// read a value
unsigned int value = strtol10( content, &content);
// read a value.
// Hack: (thom) Some exporters put negative indices sometimes. We just try to carry on anyways.
int value = std::max( 0, strtol10s( content, &content));
indices.push_back( size_t( value));
// skip whitespace after it
SkipSpacesAndLineEnd( &content);