Adapt MemoryIOSystem to delegate unhandled calls to shadowed IO system

This commit is contained in:
Adrian Perez
2019-01-18 16:43:39 -08:00
parent 40a1c1ed07
commit 8191080986
2 changed files with 25 additions and 14 deletions

View File

@@ -483,7 +483,7 @@ const aiScene* Importer::ReadFileFromMemory( const void* pBuffer,
IOSystem* io = pimpl->mIOHandler;
pimpl->mIOHandler = NULL;
SetIOHandler(new MemoryIOSystem((const uint8_t*)pBuffer,pLength));
SetIOHandler(new MemoryIOSystem((const uint8_t*)pBuffer,pLength,io));
// read the file and recover the previous IOSystem
static const size_t BufSize(Importer::MaxLenHint + 28);