[ox/std] Fix string append issues
All checks were successful
Build / build (push) Successful in 3m21s
All checks were successful
Build / build (push) Successful in 3m21s
This commit is contained in:
parent
c753881747
commit
a18c5d9294
4
deps/ox/src/ox/std/string.hpp
vendored
4
deps/ox/src/ox/std/string.hpp
vendored
@ -392,7 +392,7 @@ template<std::size_t SmallStringSize_v>
|
||||
constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operator+(const char *str) const noexcept {
|
||||
const std::size_t strLen = ox::strlen(str);
|
||||
const auto currentLen = len();
|
||||
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
|
||||
BasicString<SmallStringSize_v> cpy;
|
||||
cpy.m_buff.resize(m_buff.size() + strLen);
|
||||
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
||||
ox::listcpy(&cpy.m_buff[currentLen], str, strLen);
|
||||
@ -423,7 +423,7 @@ constexpr BasicString<SmallStringSize_v> BasicString<SmallStringSize_v>::operato
|
||||
const std::size_t strLen = src.len();
|
||||
const auto currentLen = len();
|
||||
BasicString<SmallStringSize_v> cpy(currentLen + strLen);
|
||||
cpy.m_buff.resize(m_buff.size() + strLen + 1);
|
||||
cpy.m_buff.resize(m_buff.size() + strLen);
|
||||
ox::listcpy(&cpy.m_buff[0], m_buff.data(), currentLen);
|
||||
ox::listcpy(&cpy.m_buff[currentLen], src.data(), strLen);
|
||||
cpy.m_buff[cpy.m_buff.size() - 1] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user