From 88eada90b29164058f51c88626fce616090751ae Mon Sep 17 00:00:00 2001 From: fallenoak Date: Fri, 3 Oct 2025 15:31:49 -0500 Subject: [PATCH] feat(ui): handle bytes attr in CSimpleEditBox::LoadXML --- src/ui/CSimpleEditBox.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ui/CSimpleEditBox.cpp b/src/ui/CSimpleEditBox.cpp index 122026f..4d50abc 100644 --- a/src/ui/CSimpleEditBox.cpp +++ b/src/ui/CSimpleEditBox.cpp @@ -673,8 +673,11 @@ void CSimpleEditBox::LoadXML(XMLNode* node, CStatus* status) { if (bytesAttr && *bytesAttr) { int32_t bytes = SStrToInt(bytesAttr); - // TODO - // - set some member of CSimpleEditBox + if (bytes <= 0) { + this->m_textLength = -1; + } else { + this->m_textLength = bytes - 1; + } } } else if (!SStrCmpI(child->GetName(), "HighlightColor", STORM_MAX_STR)) {