UndoBuffer.cpp: Fix PVS 471
Fix 'fTypedText' is assigned values twice successively. Change-Id: Ibadf2fced0f448441e541293d04b86bc14909c35 Reviewed-on: https://review.haiku-os.org/729 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
bf98f7960d
commit
a9002af95e
@@ -271,7 +271,6 @@ BTextView::TypingUndoBuffer::UndoSelf(BClipboard* clipboard)
|
|||||||
int32 len = fTypedEnd - fTypedStart;
|
int32 len = fTypedEnd - fTypedStart;
|
||||||
|
|
||||||
free(fTypedText);
|
free(fTypedText);
|
||||||
fTypedText = NULL;
|
|
||||||
fTypedText = (char*)malloc(len);
|
fTypedText = (char*)malloc(len);
|
||||||
memcpy(fTypedText, fTextView->Text() + fTypedStart, len);
|
memcpy(fTypedText, fTextView->Text() + fTypedStart, len);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user