diff --git a/gui/libui/src/InputField.cpp b/gui/libui/src/InputField.cpp index 145d20ed..586a452e 100644 --- a/gui/libui/src/InputField.cpp +++ b/gui/libui/src/InputField.cpp @@ -115,7 +115,7 @@ namespace ui StringView InputField::data() { - if (!m_data.size()) return StringView {}; - return StringView { (const char*)m_data.data(), m_data.size() }; + if (m_data.size() < 2) return StringView {}; + return StringView { (const char*)m_data.data(), m_data.size() - 1 }; } }