Merge pull request #192 from AIM360/FaultToleranceFor3DSLoader

3DSLoader: Skipped chunks of size 0
pull/195/merge
Alexander Gessler 2013-11-25 09:46:00 -08:00
commit d6a3df0acf
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ static const aiImporterDesc desc = {
Discreet3DS::Chunk chunk; \
ReadChunk(&chunk); \
int chunkSize = chunk.Size-sizeof(Discreet3DS::Chunk); \
if(chunkSize <= 0) \
continue; \
const int oldReadLimit = stream->GetReadLimit(); \
stream->SetReadLimit(stream->GetCurrentPos() + chunkSize); \