Author: zooey Date: 2010-08-18 19:33:48 +0200 (Wed, 18 Aug 2010) New Revision: 38243 Changeset: http://dev.haiku-os.org/changeset/38243 Ticket: http://dev.haiku-os.org/ticket/6458 Modified: haiku/trunk/src/kits/interface/TextView.cpp Log: Fix #6458 - crash in BTextView when entering Japanese characters * when I changed InsertText() to adjust the caret position recently, I forgot to drop that adjustment from all callers - _HandleInputMethodChanged() was still doing it, leading to out of bounds access Modified: haiku/trunk/src/kits/interface/TextView.cpp =================================================================== --- haiku/trunk/src/kits/interface/TextView.cpp 2010-08-18 16:44:51 UTC (rev 38242) +++ haiku/trunk/src/kits/interface/TextView.cpp 2010-08-18 17:33:48 UTC (rev 38243) @@ -5401,8 +5401,6 @@ const int32 inlineOffset = fInline->Offset(); InsertText(string, stringLen, fSelStart, NULL); - fSelStart += stringLen; - fCaretOffset = fSelEnd = fSelStart; _Refresh(inlineOffset, fSelEnd, true); _ShowCaret();