From 98fccaa35ffef140c2bf284131aed2ebebda8269 Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Fri, 30 Mar 2018 23:22:19 +0500 Subject: VKontakte: fix perpetual loop version bump --- protocols/VKontakte/src/misc.cpp | 10 +++++----- protocols/VKontakte/src/version.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 39fb340e3b..959fe799fe 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -766,18 +766,18 @@ void CVkProto::MarkDialogAsRead(MCONTACT hContact) if (userID == VK_INVALID_USER || userID == VK_FEED_USER) return; - MEVENT hDBEvent = 0; + MEVENT hDBEvent = db_event_firstUnread(hContact); MCONTACT hMContact = db_mc_tryMeta(hContact); - while ((hDBEvent = db_event_firstUnread(hContact)) != 0) - { + while (hDBEvent != 0) { DBEVENTINFO dbei = {}; - if (!db_event_get(hDBEvent, &dbei) && !mir_strcmp(m_szModuleName, dbei.szModule)) - { + if (!db_event_get(hDBEvent, &dbei) && !mir_strcmp(m_szModuleName, dbei.szModule)) { db_event_markRead(hContact, hDBEvent); pcli->pfnRemoveEvent(hMContact, hDBEvent); if (hContact != hMContact) pcli->pfnRemoveEvent(hContact, hDBEvent); } + + hDBEvent = db_event_next(hContact, hDBEvent); } } diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h index 4851f5aa63..373caf19ac 100644 --- a/protocols/VKontakte/src/version.h +++ b/protocols/VKontakte/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 1 #define __RELEASE_NUM 4 -#define __BUILD_NUM 3 +#define __BUILD_NUM 4 #include -- cgit v1.2.3