summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_cachefuncs.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/Clist_modern/src/modern_cachefuncs.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/Clist_modern/src/modern_cachefuncs.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index 7c8901bf67..c25717b344 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -284,7 +284,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat
DBVARIANT dbv = { 0 };
if (!db_get_ws(pdnce->hContact, pdnce->szProto, "XStatusName", &dbv)) {
//mir_wstrncpy(text, dbv.pszVal, text_size);
- CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
+ CopySkipUnprintableChars(text, dbv.pwszVal, text_size - 1);
db_free(&dbv);
if (text[0] != '\0')
@@ -303,7 +303,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat
if (!noAwayMsg && !noXstatus && !xstatus_has_priority && pdnce->hContact && pdnce->szProto) {
DBVARIANT dbv = { 0 };
if (!db_get_ws(pdnce->hContact, pdnce->szProto, "XStatusName", &dbv)) {
- CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1);
+ CopySkipUnprintableChars(text, dbv.pwszVal, text_size - 1);
db_free(&dbv);
if (text[0] != '\0')
@@ -479,7 +479,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact)
DBVARIANT dbv = { 0 };
if (!db_get_ws(pdnce->hContact, pdnce->szProto, "Nick", &dbv)) {
wchar_t nick[_countof(contact->szText)];
- mir_wstrncpy(nick, dbv.ptszVal, _countof(contact->szText));
+ mir_wstrncpy(nick, dbv.pwszVal, _countof(contact->szText));
db_free(&dbv);
// They are the same -> use the name to keep the case