From 6b53eaf6b1d8f4caadea8df8ec6e4c09e37993b4 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 19 Jan 2025 16:51:05 -0600 Subject: [PATCH] [ox/std] Fix string append issues --- deps/ox/src/ox/std/string.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/std/string.hpp b/deps/ox/src/ox/std/string.hpp index baf8f2d6..25293bcb 100644 --- a/deps/ox/src/ox/std/string.hpp +++ b/deps/ox/src/ox/std/string.hpp @@ -392,7 +392,7 @@ template constexpr BasicString BasicString::operator+(const char *str) const noexcept { const std::size_t strLen = ox::strlen(str); const auto currentLen = len(); - BasicString cpy(currentLen + strLen); + BasicString 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 BasicString::operato const std::size_t strLen = src.len(); const auto currentLen = len(); BasicString 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;