From d296f9f99daf102b9af5d56690e2bd00d61c1267 Mon Sep 17 00:00:00 2001 From: George Hazan <ghazan@miranda.im> Date: Tue, 24 Jul 2018 11:11:26 +0300 Subject: database: - senseless fiels ptszVal removed from DBVARIANT, pwszVal is used instead; - if you want db_get to return a string, you need to use db_get_s. --- protocols/ICQCorp/src/options.cpp | 4 ++-- protocols/ICQCorp/src/protocol.cpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'protocols/ICQCorp/src') diff --git a/protocols/ICQCorp/src/options.cpp b/protocols/ICQCorp/src/options.cpp index 380daf9b49..2b0e9f1b2c 100644 --- a/protocols/ICQCorp/src/options.cpp +++ b/protocols/ICQCorp/src/options.cpp @@ -30,11 +30,11 @@ static INT_PTR CALLBACK icqOptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP case WM_INITDIALOG: TranslateDialogDefault(hWnd); SetDlgItemInt(hWnd, IDC_OPT_UIN, db_get_dw(NULL, protoName, "UIN", 0), FALSE); - if (!db_get(NULL, protoName, "Password", &dbv)) { + if (!db_get_s(NULL, protoName, "Password", &dbv)) { SetDlgItemTextA(hWnd, IDC_OPT_PASSWORD, dbv.pszVal); db_free(&dbv); } - if (!db_get(NULL, protoName, "Server", &dbv)) { + if (!db_get_s(NULL, protoName, "Server", &dbv)) { SetDlgItemTextA(hWnd, IDC_OPT_SERVER, dbv.pszVal); db_free(&dbv); } diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index 7faa6c832e..6fa78b0e1a 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -195,7 +195,7 @@ bool ICQ::logon(unsigned short logonStatus) DBVARIANT dbv; char str[128]; - if (!db_get(NULL, protoName, "Server", &dbv)) { + if (!db_get_s(NULL, protoName, "Server", &dbv)) { lstrcpyA(str, dbv.pszVal); db_free(&dbv); } @@ -219,12 +219,11 @@ bool ICQ::logon(unsigned short logonStatus) updateContactList(); dwUIN = db_get_dw(NULL, protoName, "UIN", 0); - if (!db_get(NULL, protoName, "Password", &dbv)) { + if (!db_get_s(NULL, protoName, "Password", &dbv)) { lstrcpyA(str, dbv.pszVal); db_free(&dbv); } - timeStampLastMessage = 0; sequenceVal = 1; -- cgit v1.2.3