From d7c9eb34f80f207efd47d2fc65e31aedf166c323 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 5 Jun 2021 17:50:34 +0300 Subject: major code cleaning in regard to db_event_getBlobSize & event memory allocation --- plugins/AvatarHistory/src/AvatarDlg.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/AvatarHistory') 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]; -- cgit v1.2.3