X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d8268a1d64de58aab194e4d8ae800c755990aad..4791fafb6d69dda73abc0a92c6a9ab19ce13801a:/src/motif/textctrl.cpp diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index b604bab9e4..06e42ff6c7 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -392,7 +392,7 @@ void wxTextCtrl::SetSelection(long from, long to) void wxTextCtrl::WriteText(const wxString& text) { - long textPosition = GetInsertionPoint() + strlen (text); + long textPosition = GetInsertionPoint() + text.length(); XmTextInsert ((Widget) m_mainWidget, GetInsertionPoint(), wxConstCast(text.c_str(), char)); XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL);