summaryrefslogtreecommitdiff
path: root/plugins/Sessions/Src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-23 08:56:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-23 08:56:07 +0000
commita22596e0a8d424b18c5396b6584de57cccd180c6 (patch)
treecd65c37918310572d6b1d0e2a3e997bdcce9dcff /plugins/Sessions/Src
parentc0b689cb722431e262cd963d67b72fc66fff8110 (diff)
fix for a typo
git-svn-id: http://svn.miranda-ng.org/main/trunk@16860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Sessions/Src')
-rw-r--r--plugins/Sessions/Src/Main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index f1263a92aa..765c791e05 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -316,11 +316,9 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
case IDC_SESSDEL:
if (session_list_recovered[0] && ses_count == 256) {
- int i = 0;
- while (session_list_recovered[i]) {
+ for (int i = 0; session_list_recovered[i]; i++)
db_set_b(session_list_recovered[i], MODNAME, "wasInLastSession", 0);
- i++;
- }
+
memset(session_list_recovered, 0, sizeof(session_list_recovered));
g_bIncompletedSave = 0;
@@ -695,12 +693,14 @@ static int GetContactHandle(WPARAM, LPARAM lParam)
if (MWeventdata->uType == MSG_WINDOW_EVT_OPEN) {
if (strstr(MWeventdata->szModule, "tabSRMsg")) g_mode = 1;
AddToCurSession(MWeventdata->hContact, 0);
- if (g_bCrashRecovery) db_set_b(MWeventdata->hContact, MODNAME, "wasInLastSession", 1);
+ if (g_bCrashRecovery)
+ db_set_b(MWeventdata->hContact, MODNAME, "wasInLastSession", 1);
}
else if (MWeventdata->uType == MSG_WINDOW_EVT_CLOSE) {
if (!DONT)
DelFromCurSession(MWeventdata->hContact, 0);
- if (g_bCrashRecovery) db_set_b(MWeventdata->hContact, MODNAME, "wasInLastSession", 0);
+ if (g_bCrashRecovery)
+ db_set_b(MWeventdata->hContact, MODNAME, "wasInLastSession", 0);
}
return 0;
@@ -868,7 +868,7 @@ extern "C" __declspec(dllexport) int Load(void)
g_bCrashRecovery = db_get_b(NULL, MODNAME, "CrashRecovery", 0) != 0;
if (g_bCrashRecovery)
- g_bIncompletedSave = !db_get_b(NULL, MODNAME, "lastSaveCompleted", 0) != 0;
+ g_bIncompletedSave = db_get_b(NULL, MODNAME, "lastSaveCompleted", 0) == 0;
if (g_bIncompletedSave) {
int i = 0;