From 33d90f7a5e27a67bfe87a89b828528e0eb033123 Mon Sep 17 00:00:00 2001 From: mathias Date: Sat, 18 Dec 2004 02:44:11 +0000 Subject: fix segfaulting when new text is smaller than the oldtext, m_start_pos has to be 0 before calculating anything else. --- src/FbTk/TextBox.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc index 0454f87..2a7000a 100644 --- a/src/FbTk/TextBox.cc +++ b/src/FbTk/TextBox.cc @@ -69,6 +69,7 @@ TextBox::~TextBox() { void TextBox::setText(const std::string &text) { m_text = text; + m_start_pos = 0; cursorEnd(); adjustStartPos(); } -- cgit v0.11.2