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/MirandaG15/src/CAppletManager.cpp | 8 ++++---- plugins/MirandaG15/src/CConfig.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/MirandaG15/src') diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 2ab2c723ab..41cc3e307d 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -450,7 +450,7 @@ tstring CAppletManager::GetContactGroup(MCONTACT hContact) tstring strGroup = L""; if (!res) - strGroup = dbv.ptszVal; + strGroup = dbv.pwszVal; db_free(&dbv); return strGroup; @@ -1448,7 +1448,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) DBVARIANT dbv; if (db_get_ws(Event.hContact, szProto, "Nick", &dbv)) return 0; - CAppletManager::GetInstance()->CreateIRCHistory(Event.hContact, dbv.ptszVal); + CAppletManager::GetInstance()->CreateIRCHistory(Event.hContact, dbv.pwszVal); db_free(&dbv); } else @@ -1656,7 +1656,7 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam) char *szProto = GetContactProto(Event.hContact); if (db_get_ws(Event.hContact, szProto, "Nick", &dbv)) return 0; - Event.strValue = dbv.ptszVal; + Event.strValue = dbv.pwszVal; db_free(&dbv); } } @@ -1670,7 +1670,7 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam) DBVARIANT dbv; int res = db_get_ws(hContact, "CList", "Group", &dbv); if (!res) - Event.strValue = dbv.ptszVal; + Event.strValue = dbv.pwszVal; db_free(&dbv); } else return 0; diff --git a/plugins/MirandaG15/src/CConfig.cpp b/plugins/MirandaG15/src/CConfig.cpp index e2302eac84..2efd773872 100644 --- a/plugins/MirandaG15/src/CConfig.cpp +++ b/plugins/MirandaG15/src/CConfig.cpp @@ -333,7 +333,7 @@ void CConfig::LoadFontSettings(int iFont) if (db_get_ws(NULL, "MirandaG15", szSetting, &dbv)) mir_wstrcpy(m_logfont[iFont].lfFaceName, L"Small Fonts"); else { - mir_wstrcpy(m_logfont[iFont].lfFaceName, dbv.ptszVal); + mir_wstrcpy(m_logfont[iFont].lfFaceName, dbv.pwszVal); db_free(&dbv); } -- cgit v1.2.3