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. --- src/core/stdmsg/src/chat_options.cpp | 2 +- src/core/stdmsg/src/msgdialog.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/stdmsg') diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index fc7258ce76..932ca3f07b 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -204,7 +204,7 @@ static void InitSetting(wchar_t** ppPointer, char* pszSetting, wchar_t* pszDefau { DBVARIANT dbv; if (!db_get_ws(0, CHAT_MODULE, pszSetting, &dbv)) { - replaceStrW(*ppPointer, dbv.ptszVal); + replaceStrW(*ppPointer, dbv.pwszVal); db_free(&dbv); } else replaceStrW(*ppPointer, pszDefault); diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index cfb4c8d556..57711e2228 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -219,8 +219,8 @@ bool CSrmmWindow::OnInitDialog() if (m_hContact) { DBVARIANT dbv; if (!db_get_ws(m_hContact, SRMSGMOD, DBSAVEDMSG, &dbv)) { - if (dbv.ptszVal[0]) { - m_message.SetText(dbv.ptszVal); + if (dbv.pwszVal[0]) { + m_message.SetText(dbv.pwszVal); m_btnOk.Enable(true); UpdateReadChars(); PostMessage(m_message.GetHwnd(), EM_SETSEL, -1, -1); -- cgit v1.2.3