gui/InputField: Calculate correct length for the returned StringView
This commit is contained in:
parent
48ee803e58
commit
5d5c85a022
@ -115,7 +115,7 @@ namespace ui
|
|||||||
|
|
||||||
StringView InputField::data()
|
StringView InputField::data()
|
||||||
{
|
{
|
||||||
if (!m_data.size()) return StringView {};
|
if (m_data.size() < 2) return StringView {};
|
||||||
return StringView { (const char*)m_data.data(), m_data.size() };
|
return StringView { (const char*)m_data.data(), m_data.size() - 1 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user