From 35780da54a30840b50313ebf6ca2a0b7367d6c49 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Jan 2021 21:15:51 +0300 Subject: =?UTF-8?q?fixes=20#2700=20(Scriver:=20=D0=BF=D1=80=D0=B8=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20=D0=BE=D0=BA=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20=D0=BF=D0=BE=D0=BF?= =?UTF-8?q?=D0=B0=D0=BF=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=D1=81=D1=8F=20=D0=BB=D0=B8=D1=88=D1=8C=20=D0=BE?= =?UTF-8?q?=D0=B4=D0=BD=D0=BE=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/NewsAggregator/Src/CheckFeed.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols/NewsAggregator') diff --git a/protocols/NewsAggregator/Src/CheckFeed.cpp b/protocols/NewsAggregator/Src/CheckFeed.cpp index 87282451f4..eab3be7bb3 100644 --- a/protocols/NewsAggregator/Src/CheckFeed.cpp +++ b/protocols/NewsAggregator/Src/CheckFeed.cpp @@ -161,7 +161,9 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr T2Utf pszTemp(message); DWORD cbMemoLen = 10000, cbOrigLen = (DWORD)mir_strlen(pszTemp); BYTE *pbBuffer = (BYTE*)mir_alloc(cbMemoLen); - for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) { + + DB::ECPTR pCursor(DB::EventsRev(hContact)); + while (MEVENT hDbEvent = pCursor.FetchNext()) { olddbei.cbBlob = db_event_getBlobSize(hDbEvent); if (olddbei.cbBlob > cbMemoLen) pbBuffer = (PBYTE)mir_realloc(pbBuffer, (size_t)(cbMemoLen = olddbei.cbBlob)); -- cgit v1.2.3