now checks the real lenght of the passed buffer in BTextView::Insert(). Seems to fix bug 675
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18967 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1105,9 +1105,13 @@ BTextView::Insert(int32 startOffset, const char *inText, int32 inLength,
|
||||
CancelInputMethod();
|
||||
|
||||
// do we really need to do anything?
|
||||
if (inLength < 1)
|
||||
if (inText == NULL || inLength < 1)
|
||||
return;
|
||||
|
||||
int32 realLength = strlen(inText);
|
||||
if (inLength > realLength)
|
||||
inLength = realLength;
|
||||
|
||||
if (startOffset > TextLength())
|
||||
startOffset = TextLength();
|
||||
|
||||
@@ -3496,9 +3500,8 @@ BTextView::ActualTabWidth(float location) const
|
||||
|
||||
|
||||
void
|
||||
BTextView::DoInsertText(const char *inText, int32 inLength, int32 inOffset,
|
||||
const text_run_array *inRuns,
|
||||
_BTextChangeResult_ *outResult)
|
||||
BTextView::DoInsertText(const char *inText, int32 inLength, int32 inOffset,
|
||||
const text_run_array *inRuns, _BTextChangeResult_ *outResult)
|
||||
{
|
||||
CALLED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user