diff --git a/include/assimp/LineSplitter.h b/include/assimp/LineSplitter.h index ef487bfc2..84a843898 100644 --- a/include/assimp/LineSplitter.h +++ b/include/assimp/LineSplitter.h @@ -155,7 +155,7 @@ AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_emp mSkip_empty_lines(skip_empty_lines), mTrim(trim) { mCur.reserve(1024); - mEnd = mCur.c_str() + mCur.size(); + mEnd = mCur.c_str() + mCur.capacity(); operator++(); mIdx = 0; } @@ -172,7 +172,7 @@ AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() { char s; mCur.clear(); - mEnd = mCur.c_str() + mCur.size(); + mEnd = mCur.c_str() + mCur.capacity(); while (mStream.GetRemainingSize() && (s = mStream.GetI1(), 1)) { if (s == '\n' || s == '\r') { if (mSkip_empty_lines) { @@ -195,7 +195,7 @@ AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() { break; } mCur += s; - mEnd = mCur.c_str() + mCur.size(); + mEnd = mCur.c_str() + mCur.capacity(); } ++mIdx;