FIX: Caculate buffer end pointer after initing all attributes

pull/4736/head
Kim Kulling 2022-09-20 21:35:44 +02:00
parent f1766c4bd5
commit 1f61f0c3de
1 changed files with 2 additions and 1 deletions

View File

@ -60,10 +60,11 @@ using namespace Assimp::MD5;
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Parse the segment structure for an MD5 file // Parse the segment structure for an MD5 file
MD5Parser::MD5Parser(char *_buffer, unsigned int _fileSize) : buffer(_buffer), bufferEnd(_buffer + fileSize), fileSize(_fileSize), lineNumber(0) { MD5Parser::MD5Parser(char *_buffer, unsigned int _fileSize) : buffer(_buffer), bufferEnd(nullptr), fileSize(_fileSize), lineNumber(0) {
ai_assert(nullptr != _buffer); ai_assert(nullptr != _buffer);
ai_assert(0 != _fileSize); ai_assert(0 != _fileSize);
bufferEnd = buffer + _fileSize;
ASSIMP_LOG_DEBUG("MD5Parser begin"); ASSIMP_LOG_DEBUG("MD5Parser begin");
// parse the file header // parse the file header