diff options
author | Mataes <mataes2007@gmail.com> | 2020-04-04 00:32:54 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2020-04-04 00:33:19 +0300 |
commit | 067cd1176e7b6e57107e3926ddaba3a7e7880949 (patch) | |
tree | ed7938060d19f8ffe18ba5ec674142a9a9a4b3df /plugins/NewStory/src/history_array.cpp | |
parent | 43a10fea91545df9128f0792d3b6cee78f4fd3ec (diff) |
newstory: change some function to mir_*. Maybe create memleaks
Diffstat (limited to 'plugins/NewStory/src/history_array.cpp')
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 9676fdb6e9..0d8c870c6c 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -17,7 +17,7 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) if ((mode == ELM_DATA) && (!dbeOk || !dbe.cbBlob)) { dbeOk = true; dbe.cbBlob = db_event_getBlobSize(hEvent); - dbe.pBlob = (PBYTE)calloc(dbe.cbBlob + 1, 1); + dbe.pBlob = (PBYTE)mir_calloc(dbe.cbBlob + 1); db_event_get(hEvent, &dbe); int aLength = 0; @@ -30,9 +30,9 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) { atext = (char *)dbe.pBlob; atext_del = false; - aLength = lstrlenA(atext); + aLength = mir_strlen(atext); if (dbe.cbBlob > (DWORD)aLength + 1) { - wtext = (WCHAR *)(dbe.pBlob + aLength + 1); + wtext = (wchar_t *)(dbe.pBlob + aLength + 1); wtext_del = false; } break; @@ -48,7 +48,7 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) else { mir_snprintf(atext, 512, ("%d requested authorization"), *(DWORD *)(dbe.pBlob)); } - aLength = lstrlenA(atext); + aLength = mir_strlen(atext); break; } @@ -62,7 +62,7 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) else { mir_snprintf(atext, 512, ("%d added you to the contact list"), *(DWORD *)(dbe.pBlob)); } - aLength = lstrlenA(atext); + aLength = mir_strlen(atext); break; } } @@ -99,7 +99,7 @@ bool HistoryArray::ItemData::load(EventLoadMode mode) HistoryArray::ItemData::~ItemData() { if (dbeOk && dbe.pBlob) { - free(dbe.pBlob); + mir_free(dbe.pBlob); dbe.pBlob = 0; } if (wtext && wtext_del) delete[] wtext; |