From cfc52e743a79a7ee49e577b72b2f8ed44017d221 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Mon, 29 Feb 2016 16:47:05 +0000 Subject: dbx_lmdb: small fix git-svn-id: http://svn.miranda-ng.org/main/trunk@16380 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_mdb/src/dbevents.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/Dbx_mdb') diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdb/src/dbevents.cpp index 30078625c7..d8ea2607a2 100644 --- a/plugins/Dbx_mdb/src/dbevents.cpp +++ b/plugins/Dbx_mdb/src/dbevents.cpp @@ -252,7 +252,9 @@ void CDbxMdb::FindNextUnread(const txn_ptr &txn, DBCachedContact *cc, DBEventSor mdb_cursor_get(cursor, &key, &data, MDB_SET); while (mdb_cursor_get(cursor, &key, &data, MDB_NEXT) == 0) { DBEvent *dbe = (DBEvent*)data.mv_data; - if (dbe->contactID == cc->contactID && !dbe->markedRead()) { + if (dbe->contactID != cc->contactID) + break; + if (!dbe->markedRead()) { cc->dbc.dwFirstUnread = key2.dwEventId; cc->dbc.tsFirstUnread = key2.ts; return; -- cgit v1.2.3