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-9d2fd5bffc1fpull/1/head
parent
0fd0f68b26
commit
136ef7609d
|
@ -2005,8 +2005,9 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
|
||||||
const char* content = GetTextContent();
|
const char* content = GetTextContent();
|
||||||
while( *content != 0)
|
while( *content != 0)
|
||||||
{
|
{
|
||||||
// read a value
|
// read a value.
|
||||||
unsigned int value = strtol10( content, &content);
|
// 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));
|
indices.push_back( size_t( value));
|
||||||
// skip whitespace after it
|
// skip whitespace after it
|
||||||
SkipSpacesAndLineEnd( &content);
|
SkipSpacesAndLineEnd( &content);
|
||||||
|
|
|
@ -40,7 +40,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "AssimpPCH.h"
|
#include "AssimpPCH.h"
|
||||||
#ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include "DefaultIOSystem.h"
|
#include "DefaultIOSystem.h"
|
||||||
#include "Q3BSPFileImporter.h"
|
#include "Q3BSPFileImporter.h"
|
||||||
#include "Q3BSPZipArchive.h"
|
#include "Q3BSPZipArchive.h"
|
||||||
|
|
Loading…
Reference in New Issue