diff options
author | George Hazan <ghazan@miranda.im> | 2021-02-27 15:05:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-02-27 15:05:14 +0300 |
commit | a8b08868d72e9ae7defea8caade74e451d7b8d88 (patch) | |
tree | 14c29d40047e7a24c78fa52f32d92a266cfaca06 /plugins/Dbx_sqlite/src/dbintf.h | |
parent | ccd536abba45dd6cde16d727c1bc1706799bb802 (diff) |
fixes #2736 (Dbx_sqlite: improper work of FindNext/FindPrev results to the eternal loop)
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbintf.h')
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbintf.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h index b2f2c264ca..0d4a9ed29f 100755 --- a/plugins/Dbx_sqlite/src/dbintf.h +++ b/plugins/Dbx_sqlite/src/dbintf.h @@ -39,8 +39,18 @@ class CDbxSQLite : public MDatabaseCommon, public MZeroedObject ptrW m_wszFileName; sqlite3 *m_db = nullptr; - sqlite3_stmt *evt_cur_fwd = nullptr, *evt_cur_backwd = nullptr; - MCONTACT evt_cnt_fwd = 0, evt_cnt_backwd = 0; + struct { + sqlite3_stmt *cur; + MCONTACT hContact; + MEVENT hEvent; + + void clear() { + if (cur) + sqlite3_reset(cur); + memset(this, 0, sizeof(*this)); + } + } + fwd, back; DBCachedContact m_system; |