From d296f9f99daf102b9af5d56690e2bd00d61c1267 Mon Sep 17 00:00:00 2001 From: George Hazan 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. --- plugins/UserInfoEx/src/ctrl_contact.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/UserInfoEx/src/ctrl_contact.cpp') 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")) { -- cgit v1.2.3