fix(ui): correct handling of bytes attribute when loading CSimpleEditBox XML

This commit is contained in:
fallenoak 2025-10-04 22:30:35 -05:00
parent ad8cf56d29
commit a3d87bfd56
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -674,9 +674,9 @@ void CSimpleEditBox::LoadXML(XMLNode* node, CStatus* status) {
int32_t bytes = SStrToInt(bytesAttr);
if (bytes <= 0) {
this->m_textLength = -1;
this->m_textLengthMax = -1;
} else {
this->m_textLength = bytes - 1;
this->m_textLengthMax = bytes - 1;
}
}