summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/document/katedocument.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate/libkate/document/katedocument.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katedocument.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp
index 6dc4fd2..a70f3aa 100644
--- a/noncore/apps/tinykate/libkate/document/katedocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp
@@ -2216,13 +2216,13 @@ bool KateDocument::doSearch(SConfig &sc, const QString &searchFor) {
} else searchEnd = lastLine();
while (line <= searchEnd) {
textLine = getTextLine(line);
tlen = textLine->length();
if (tlen > bufLen) {
- delete t;
+ delete [] t;
bufLen = (tlen + 255) & (~255);
t = new QChar[bufLen];
}
memcpy(t, textLine->getText(), tlen*sizeof(QChar));
if (sc.flags & KateView::sfSelected) {
pos = 0;
@@ -2277,13 +2277,13 @@ bool KateDocument::doSearch(SConfig &sc, const QString &searchFor) {
} else searchEnd = 0;
while (line >= searchEnd) {
textLine = getTextLine(line);
tlen = textLine->length();
if (tlen > bufLen) {
- delete t;
+ delete [] t;
bufLen = (tlen + 255) & (~255);
t = new QChar[bufLen];
}
memcpy(t, textLine->getText(), tlen*sizeof(QChar));
if (sc.flags & KateView::sfSelected) {
pos = 0;