Md5Parser fixes

pull/5421/head
Kim Kulling 2024-01-29 21:39:31 +01:00
parent 6230e70d02
commit ad18a69506
4 changed files with 16 additions and 18 deletions

View File

@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2024, assimp team
All rights reserved.

View File

@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2023, assimp team
Copyright (c) 2006-2024, assimp team
All rights reserved.
@ -210,8 +210,9 @@ bool MD5Parser::ParseSection(Section &out) {
}
break;
}
if (buffer == bufferEnd)
if (buffer == bufferEnd) {
return false;
}
while (IsSpaceOrNewLine(*buffer)) {
if (buffer == bufferEnd) {
break;
@ -221,9 +222,6 @@ bool MD5Parser::ParseSection(Section &out) {
return '\0' != *buffer;
}
// ------------------------------------------------------------------------------------------------
// Some dirty macros just because they're so funny and easy to debug
// skip all spaces ... handle EOL correctly
inline void AI_MD5_SKIP_SPACES(const char **sz, const char *bufferEnd, int linenumber) {
if (!SkipSpaces(sz, bufferEnd)) {
@ -256,7 +254,7 @@ inline void AI_MD5_READ_TRIPLE(aiVector3D &vec, const char **sz, const char *buf
inline bool AI_MD5_PARSE_STRING(const char **sz, const char *bufferEnd, aiString &out, int linenumber) {
bool bQuota = (**sz == '\"');
const char *szStart = *sz;
while (!IsSpaceOrNewLine(*sz)) {
while (!IsSpaceOrNewLine(**sz)) {
++*sz;
if (*sz == bufferEnd) break;
}
@ -293,6 +291,7 @@ inline void AI_MD5_PARSE_STRING_IN_QUOTATION(const char **sz, const char *buffer
}
out.data[out.length] = '\0';
}
// ------------------------------------------------------------------------------------------------
// .MD5MESH parsing function
MD5MeshParser::MD5MeshParser(SectionArray &mSections) {

View File

@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2023, assimp team
Copyright (c) 2006-2024, assimp team
All rights reserved.

View File

@ -60,8 +60,7 @@ void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const*
/// @brief Helper to read a file.
template <size_t N, size_t N2>
inline
void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const (&arr)[N], const char* const (&arr2)[N2]) {
inline void ReadFile(DB& db,const EXPRESS::ConversionSchema& scheme, const char* const (&arr)[N], const char* const (&arr2)[N2]) {
return ReadFile(db,scheme,arr,N,arr2,N2);
}