summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src/windows.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
commitd296f9f99daf102b9af5d56690e2bd00d61c1267 (patch)
tree39311caaf80abf0b47ecb78cf94dc8157b193575 /protocols/IRCG/src/windows.cpp
parentffc521e5d5e9bd66feb65afe0046b3fc7e073356 (diff)
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.
Diffstat (limited to 'protocols/IRCG/src/windows.cpp')
-rw-r--r--protocols/IRCG/src/windows.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp
index b921af9029..728c451996 100644
--- a/protocols/IRCG/src/windows.cpp
+++ b/protocols/IRCG/src/windows.cpp
@@ -215,8 +215,8 @@ bool CNickDlg::OnInitDialog()
DBVARIANT dbv;
if (!m_proto->getWString("RecentNicks", &dbv)) {
for (int i = 0; i < 10; i++)
- if (!GetWord(dbv.ptszVal, i).IsEmpty())
- SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)GetWord(dbv.ptszVal, i).c_str());
+ if (!GetWord(dbv.pwszVal, i).IsEmpty())
+ SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)GetWord(dbv.pwszVal, i).c_str());
db_free(&dbv);
}
@@ -239,7 +239,7 @@ void CNickDlg::OnOk(CCtrlButton*)
DBVARIANT dbv;
if (!m_proto->getWString("RecentNicks", &dbv)) {
for (int i = 0; i < 10; i++) {
- CMStringW s = GetWord(dbv.ptszVal, i);
+ CMStringW s = GetWord(dbv.pwszVal, i);
if (!s.IsEmpty() && s != szTemp)
S += L" " + s;
}
@@ -509,8 +509,8 @@ bool CJoinDlg::OnInitDialog()
DBVARIANT dbv;
if (!m_proto->getWString("RecentChannels", &dbv)) {
for (int i = 0; i < 20; i++) {
- if (!GetWord(dbv.ptszVal, i).IsEmpty()) {
- CMStringW S = GetWord(dbv.ptszVal, i);
+ if (!GetWord(dbv.pwszVal, i).IsEmpty()) {
+ CMStringW S = GetWord(dbv.pwszVal, i);
S.Replace(L"%newl", L" ");
SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)S.c_str());
}
@@ -542,7 +542,7 @@ void CJoinDlg::OnOk(CCtrlButton*)
DBVARIANT dbv;
if (!m_proto->getWString("RecentChannels", &dbv)) {
for (int i = 0; i < 20; i++) {
- CMStringW W = GetWord(dbv.ptszVal, i);
+ CMStringW W = GetWord(dbv.pwszVal, i);
if (!W.IsEmpty() && W != SL)
S += L" " + W;
}
@@ -1292,7 +1292,7 @@ void CManagerDlg::InitManager(int mode, const wchar_t* window)
DBVARIANT dbv;
if (!m_proto->getWString(p, &dbv)) {
for (int i = 0; i < 5; i++) {
- CMStringW S = GetWord(dbv.ptszVal, i);
+ CMStringW S = GetWord(dbv.pwszVal, i);
if (!S.IsEmpty()) {
/* FIXME: What the hell does it mean!? GCC won't compile this on UNICODE */
#if !defined(__GNUC__) || !defined(UNICODE)