From a31d67921b9bef0cb0f550b658832efadab74d09 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 14 Jun 2025 13:11:37 +1000 Subject: [PATCH] SmallString: Use L instead of L+1 Keep the stack aligned to power of 2. --- src/common/small_string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/small_string.h b/src/common/small_string.h index 744a71fbb..9fc6ace4c 100644 --- a/src/common/small_string.h +++ b/src/common/small_string.h @@ -353,12 +353,12 @@ public: static SmallStackString from_vformat(fmt::string_view fmt, fmt::format_args args); private: - char m_stack_buffer[L + 1]; + char m_stack_buffer[L]; ALWAYS_INLINE void init() { m_buffer = m_stack_buffer; - m_buffer_size = L + 1; + m_buffer_size = L; #ifdef _DEBUG std::memset(m_stack_buffer, 0, sizeof(m_stack_buffer));