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();
|
CancelInputMethod();
|
||||||
|
|
||||||
// do we really need to do anything?
|
// do we really need to do anything?
|
||||||
if (inLength < 1)
|
if (inText == NULL || inLength < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int32 realLength = strlen(inText);
|
||||||
|
if (inLength > realLength)
|
||||||
|
inLength = realLength;
|
||||||
|
|
||||||
if (startOffset > TextLength())
|
if (startOffset > TextLength())
|
||||||
startOffset = TextLength();
|
startOffset = TextLength();
|
||||||
|
|
||||||
@@ -3496,9 +3500,8 @@ BTextView::ActualTabWidth(float location) const
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BTextView::DoInsertText(const char *inText, int32 inLength, int32 inOffset,
|
BTextView::DoInsertText(const char *inText, int32 inLength, int32 inOffset,
|
||||||
const text_run_array *inRuns,
|
const text_run_array *inRuns, _BTextChangeResult_ *outResult)
|
||||||
_BTextChangeResult_ *outResult)
|
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user