diff --git a/src/string.cpp b/src/string.cpp index 6fb47aa..d1ba8ae 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -255,7 +255,12 @@ istring& istring::operator+=(const string_view& str) { } istring& istring::operator+=(char ch) { - return append(1, ch); + if (m_size < m_capacity) { + m_str[m_size] = ch; + ++m_size; + } + + return *this; } istring& istring::replace(size_t pos, size_t count, const string_view& str) {