summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/infopanel.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/TabSRMM/src/infopanel.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/TabSRMM/src/infopanel.cpp')
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index ffd67d6fda..e5e37e1bd3 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -887,7 +887,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
if (BYTE xStatus = m_dat->m_cache->getXStatusId()) {
wchar_t *tszXStatusName = nullptr;
if (0 == db_get_ws(m_dat->m_cache->getContact(), m_dat->m_cache->getProto(), "XStatusName", &dbv))
- tszXStatusName = dbv.ptszVal;
+ tszXStatusName = dbv.pwszVal;
else if (xStatus > 0 && xStatus <= 31)
tszXStatusName = xStatusDescr[xStatus - 1];
@@ -896,8 +896,8 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
str.AppendFormat(L"%s%s%s", tszXStatusName, m_dat->m_cache->getXStatusMsg() ? L" / " : L"",
m_dat->m_cache->getXStatusMsg() ? m_dat->m_cache->getXStatusMsg() : L"");
- if (dbv.ptszVal)
- mir_free(dbv.ptszVal);
+ if (dbv.pwszVal)
+ mir_free(dbv.pwszVal);
}
}
@@ -905,7 +905,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
str.AppendFormat(TranslateT("\\par\\par\\ul\\b Listening to:\\ul0\\b0 \\par %s"), m_dat->m_cache->getListeningInfo());
if (0 == db_get_ws(m_dat->m_cache->getActiveContact(), m_dat->m_cache->getActiveProto(), "MirVer", &dbv)) {
- str.AppendFormat(TranslateT("\\par\\par\\ul\\b Client:\\ul0\\b0 %s"), dbv.ptszVal);
+ str.AppendFormat(TranslateT("\\par\\par\\ul\\b Client:\\ul0\\b0 %s"), dbv.pwszVal);
::db_free(&dbv);
}
str.AppendChar('}');