From e1a64227273b2f6fb55b6b0ba4b2b5d2998866b2 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 18 Aug 2010 17:33:48 +0000 Subject: [PATCH] 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 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38243 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index 126f21e9d9..c57f4d9539 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -5401,8 +5401,6 @@ BTextView::_HandleInputMethodChanged(BMessage *message) const int32 inlineOffset = fInline->Offset(); InsertText(string, stringLen, fSelStart, NULL); - fSelStart += stringLen; - fCaretOffset = fSelEnd = fSelStart; _Refresh(inlineOffset, fSelEnd, true); _ShowCaret();