summaryrefslogtreecommitdiff
path: root/plugins/AvatarHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-06-05 17:50:34 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-06-05 17:50:34 +0300
commitd7c9eb34f80f207efd47d2fc65e31aedf166c323 (patch)
tree338b9b905674dc31b1efab739dfcedeed3d8d7b3 /plugins/AvatarHistory/src
parentffc5a3d7550528281976745279e77ac9faba551b (diff)
major code cleaning in regard to db_event_getBlobSize & event memory allocation
Diffstat (limited to 'plugins/AvatarHistory/src')
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 245c58005a..a03378ec28 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -412,12 +412,12 @@ int FillAvatarListFromDB(HWND list, MCONTACT hContact)
int max_pos = 0;
DB::ECPTR pCursor(DB::Events(hContact));
while (MEVENT hDbEvent = pCursor.FetchNext()) {
- DBEVENTINFO dbei = {};
- BYTE blob[2048];
- dbei.cbBlob = sizeof(blob);
- dbei.pBlob = blob;
- if (db_event_get(hDbEvent, &dbei) != 0) continue;
- if (dbei.eventType != EVENTTYPE_AVATAR_CHANGE) continue;
+ DB::EventInfo dbei;
+ dbei.cbBlob = -1;
+ if (db_event_get(hDbEvent, &dbei))
+ continue;
+ if (dbei.eventType != EVENTTYPE_AVATAR_CHANGE)
+ continue;
// Get time
wchar_t date[64];