diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-26 09:53:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-26 09:53:04 +0000 |
commit | 5f5270854027fbafc77086cdfad554a9fee2faa2 (patch) | |
tree | 04664186f43df4cd00206feb7311f49aa22f759f /src/core | |
parent | 44d110f4f1ec6a6ef854331e34fc25b7d0edb848 (diff) |
fix for #1290 (Clist: Crash on "contact.cpp (56): CompareContacts" and "shlcom.cpp (187): SortContact")
git-svn-id: http://svn.miranda-ng.org/main/trunk@17334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdclist/src/contact.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/stdclist/src/contact.cpp b/src/core/stdclist/src/contact.cpp index 23163d83fc..5f5f778e26 100644 --- a/src/core/stdclist/src/contact.cpp +++ b/src/core/stdclist/src/contact.cpp @@ -55,11 +55,9 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2) {
MCONTACT a = c1->hContact, b = c2->hContact;
wchar_t namea[128], *nameb;
- int statusa, statusb;
- int rc;
- statusa = db_get_w(a, c1->proto, "Status", ID_STATUS_OFFLINE);
- statusb = db_get_w(b, c2->proto, "Status", ID_STATUS_OFFLINE);
+ int statusa = db_get_w(a, c1->proto, "Status", ID_STATUS_OFFLINE);
+ int statusb = db_get_w(b, c2->proto, "Status", ID_STATUS_OFFLINE);
if (g_bSortByProto) {
/* deal with statuses, online contacts have to go above offline */
@@ -68,7 +66,7 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2) }
/* both are online, now check protocols */
if (c1->proto != NULL && c2->proto != NULL) {
- rc = mir_strcmp(c1->proto, c2->proto);
+ int rc = mir_strcmp(c1->proto, c2->proto);
if (rc != 0)
return rc;
}
|