From b327ed7872ca83c3a4249039ba1a3d8dd3ece630 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 17 Jan 2017 17:19:19 +0300 Subject: useless field DBEVENTINFO::cbSize removed --- plugins/Msg_Export/src/options.cpp | 2 +- plugins/Msg_Export/src/utils.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Msg_Export') diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 995ff36544..dc40c7c1cd 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -64,7 +64,7 @@ public: hUser = hU; hDbEvent = hDBE; - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; db_event_get(hDbEvent, &dbei); time = dbei.timestamp; } diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 6deb7aaccb..351a907e7c 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -1105,7 +1105,7 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) DWORD uin = *((PDWORD)(dbei.pBlob)); int n = mir_snwprintf(szTemp, L"%d", uin); if (bWriteTextToFile(hFile, szTemp, bWriteUTF8Format, n)) { - char *pszEnd = (char *)(dbei.pBlob + dbei.cbSize); + char *pszEnd = (char *)(dbei.pBlob + sizeof(dbei)); for (int i = 0; i < nStringCount && pszCurBlobPos < pszEnd; i++) { if (*pszCurBlobPos) { if (!bWriteNewLine(hFile, nIndent) || @@ -1214,7 +1214,7 @@ int nExportEvent(WPARAM hContact, LPARAM hDbEvent) if (!db_get_b(hContact, MODULE, "EnableLog", 1)) return 0; - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; int nSize = db_event_getBlobSize(hDbEvent); if (nSize > 0) { dbei.cbBlob = nSize; -- cgit v1.2.3