summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ctrl_contact.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 /plugins/UserInfoEx/src/ctrl_contact.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 'plugins/UserInfoEx/src/ctrl_contact.cpp')
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index 1254d743c1..84de9f555f 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -1297,7 +1297,7 @@ int CtrlContactAddItemFromDB(
if (cbi.wFlags == CBEXIF_CATREADONLY)
cbi.pszVal = nullptr;
else { // check the database value
- cbi.pszVal = dbv.ptszVal;
+ cbi.pszVal = dbv.pwszVal;
if (LPTSTR sms = wcsstr(cbi.pszVal, L" SMS")) {
cbi.wFlags |= CBEXIF_SMS;
*sms = 0;
@@ -1356,9 +1356,9 @@ int CtrlContactAddMyItemsFromDB(
{
// read value
cbi.dwID = hashSetting(pszSetting);
- cbi.pszVal = dbv.ptszVal;
+ cbi.pszVal = dbv.pwszVal;
dbv.type = DBVT_DELETED;
- dbv.ptszVal = nullptr;
+ dbv.pwszVal = nullptr;
// read category
if (SUCCEEDED(mir_snprintf(pszSetting, szFormatCat, i))) {
@@ -1372,10 +1372,10 @@ int CtrlContactAddMyItemsFromDB(
dbv.type = DBVT_DELETED;
}
- if (dbv.type > DBVT_DELETED && dbv.ptszVal && *dbv.ptszVal) {
- cbi.pszCat = dbv.ptszVal;
+ if (dbv.type > DBVT_DELETED && dbv.pwszVal && *dbv.pwszVal) {
+ cbi.pszCat = dbv.pwszVal;
dbv.type = DBVT_DELETED;
- dbv.ptszVal = nullptr;
+ dbv.pwszVal = nullptr;
}
}
if (sms = wcsstr(cbi.pszVal, L" SMS")) {