diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
commit | d296f9f99daf102b9af5d56690e2bd00d61c1267 (patch) | |
tree | 39311caaf80abf0b47ecb78cf94dc8157b193575 /protocols/IRCG/src/options.cpp | |
parent | ffc521e5d5e9bd66feb65afe0046b3fc7e073356 (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/options.cpp')
-rw-r--r-- | protocols/IRCG/src/options.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index a1ae6248a0..d1e155fd9d 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -62,11 +62,11 @@ void CIrcProto::ReadSettings(TDbSetting* sets, int count) case DBVT_WCHAR:
if (!getWString(p->name, &dbv)) {
if (p->size != -1) {
- size_t len = min(p->size - 1, mir_wstrlen(dbv.ptszVal));
+ size_t len = min(p->size - 1, mir_wstrlen(dbv.pwszVal));
memcpy(ptr, dbv.pszVal, len*sizeof(wchar_t));
*(wchar_t*)&ptr[len*sizeof(wchar_t)] = 0;
}
- else *(wchar_t**)ptr = mir_wstrdup(dbv.ptszVal);
+ else *(wchar_t**)ptr = mir_wstrdup(dbv.pwszVal);
db_free(&dbv);
}
else {
@@ -1177,7 +1177,7 @@ void COtherPrefsDlg::addPerformComboValue(int idx, const char* szValueName) PERFORM_INFO* pPref;
DBVARIANT dbv;
if (!m_proto->getWString(sSetting.c_str(), &dbv)) {
- pPref = new PERFORM_INFO(sSetting.c_str(), dbv.ptszVal);
+ pPref = new PERFORM_INFO(sSetting.c_str(), dbv.pwszVal);
db_free(&dbv);
}
else pPref = new PERFORM_INFO(sSetting.c_str(), L"");
@@ -1363,9 +1363,9 @@ void CIrcProto::InitIgnore(void) if (getWString(settingName, &dbv))
break;
- CMStringW mask = GetWord(dbv.ptszVal, 0);
- CMStringW flags = GetWord(dbv.ptszVal, 1);
- CMStringW network = GetWord(dbv.ptszVal, 2);
+ CMStringW mask = GetWord(dbv.pwszVal, 0);
+ CMStringW flags = GetWord(dbv.pwszVal, 1);
+ CMStringW network = GetWord(dbv.pwszVal, 2);
m_ignoreItems.insert(new CIrcIgnoreItem(mask.c_str(), flags.c_str(), network.c_str()));
db_free(&dbv);
}
|