summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-06-13 21:35:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-06-13 21:35:33 +0300
commite00d1d823ba43f0b42a6ee1e1972b99f904a4dfb (patch)
tree7ca90936f10ac142379d7288a878f1010c855a1b
parent0360a875912953548e4f785f313294f1022fd657 (diff)
fixes #2898 (Notes and Reminders: после рестарта пропадает текст заметок)
-rw-r--r--plugins/NotesAndReminders/src/notes.cpp4
-rw-r--r--plugins/NotesAndReminders/src/version.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp
index ef1c129635..c547994008 100644
--- a/plugins/NotesAndReminders/src/notes.cpp
+++ b/plugins/NotesAndReminders/src/notes.cpp
@@ -271,7 +271,7 @@ static void JustSaveNotes(STICKYNOTE *pModified = nullptr)
if (SzT) { // TODO: change to support unicode and rtf, use EM_STREAMOUT
if (SzT > MAX_NOTE_LEN)
SzT = MAX_NOTE_LEN; // we want to be far below the 64k limit
- pNote->wszText.Preallocate(SzT + 1);
+ pNote->wszText.Truncate(SzT + 1);
GetWindowTextW(pNote->REHwnd, pNote->wszText.GetBuffer(), SzT + 1);
}
else pNote->wszText.Empty();
@@ -1236,7 +1236,7 @@ static void LoadNote(char *Value, bool bIsStartup)
case DATATAG_TEXT:
if (auto *pwszTmp = mir_utf8decodeW(TVal)) {
wszText = pwszTmp;
- delete pwszTmp;
+ mir_free(pwszTmp);
}
else wszText = _A2T(TVal);
break;
diff --git a/plugins/NotesAndReminders/src/version.h b/plugins/NotesAndReminders/src/version.h
index fcfef34732..1c982ce81c 100644
--- a/plugins/NotesAndReminders/src/version.h
+++ b/plugins/NotesAndReminders/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 2
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#include <stdver.h>