diff options
author | Andy Nichols <andy.nichols@qt.io> | 2025-06-10 12:58:18 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2025-06-10 12:59:03 +0200 |
commit | 488a2f7af2920295ada886f113a0d563dab79b8d (patch) | |
tree | 60618a0947d45081caf6c5038cee9706e4af4ae0 /include/assimp/ParsingUtils.h | |
parent | 647f94648c0ae24b9c6684383a9dbbc0e2fc23b7 (diff) | |
parent | fb375dd8c0a032106a2122815fb18dffe0283721 (diff) |
Merge tag 'v6.0.2' into qt6_assimpqt6_assimp
Change-Id: I70ab8ef899f760cfa3ef8406419ecdb976d6ffc3
Diffstat (limited to 'include/assimp/ParsingUtils.h')
-rw-r--r-- | include/assimp/ParsingUtils.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/assimp/ParsingUtils.h b/include/assimp/ParsingUtils.h index e0ee2d77c..26fb03e70 100644 --- a/include/assimp/ParsingUtils.h +++ b/include/assimp/ParsingUtils.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2024, assimp team +Copyright (c) 2006-2025, assimp team All rights reserved. @@ -119,7 +119,7 @@ AI_FORCE_INLINE bool SkipSpaces(const char_t **inout, const char_t *end) { // --------------------------------------------------------------------------------- template <class char_t> AI_FORCE_INLINE bool SkipLine(const char_t *in, const char_t **out, const char_t *end) { - while ((*in != (char_t)'\r' && *in != (char_t)'\n' && *in != (char_t)'\0') && in != end) { + while ((*in != (char_t)'\r' && *in != (char_t)'\n' && *in != (char_t)'\0') && *in != (char_t)'#' && in != end) { ++in; } @@ -161,13 +161,13 @@ AI_FORCE_INLINE bool GetNextLine(const char_t *&buffer, char_t out[BufferSize]) } char *_out = out; - char *const end = _out + BufferSize; + char *const end = _out + BufferSize - 1; while (!IsLineEnd(*buffer) && _out < end) { *_out++ = *buffer++; } *_out = (char_t)'\0'; - while (IsLineEnd(*buffer) && '\0' != *buffer) { + while (IsLineEnd(*buffer) && '\0' != *buffer && buffer != end) { ++buffer; } |