fix segfaulting when new text is smaller than the oldtext,

m_start_pos has to be 0 before calculating anything else.
This commit is contained in:
mathias 2004-12-18 02:44:11 +00:00
parent c7baeb1ae2
commit 33d90f7a5e

View file

@ -69,6 +69,7 @@ TextBox::~TextBox() {
void TextBox::setText(const std::string &text) {
m_text = text;
m_start_pos = 0;
cursorEnd();
adjustStartPos();
}