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/Clist_modern/src/modern_cachefuncs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Clist_modern/src/modern_cachefuncs.cpp') 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 -- cgit v1.2.3