summaryrefslogtreecommitdiff
path: root/src/mir_core
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 /src/mir_core
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 'src/mir_core')
-rw-r--r--src/mir_core/src/CDbLink.cpp2
-rw-r--r--src/mir_core/src/timezones.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mir_core/src/CDbLink.cpp b/src/mir_core/src/CDbLink.cpp
index f9ab9c7d34..a71d1f1398 100644
--- a/src/mir_core/src/CDbLink.cpp
+++ b/src/mir_core/src/CDbLink.cpp
@@ -77,7 +77,7 @@ wchar_t* CDbLink::LoadText()
if (dbv.type != DBVT_DELETED) db_free(&dbv);
if (!db_get_ws(0, m_szModule, m_szSetting, &dbv)) {
if (dbv.type == DBVT_WCHAR)
- return dbv.ptszVal;
+ return dbv.pwszVal;
return m_szDefault;
}
diff --git a/src/mir_core/src/timezones.cpp b/src/mir_core/src/timezones.cpp
index b47cc144b8..d005092352 100644
--- a/src/mir_core/src/timezones.cpp
+++ b/src/mir_core/src/timezones.cpp
@@ -241,7 +241,7 @@ MIR_CORE_DLL(HANDLE) TimeZone_CreateByContact(MCONTACT hContact, LPCSTR szModule
DBVARIANT dbv;
if (!db_get_ws(hContact, szModule, "TzName", &dbv)) {
- HANDLE res = TimeZone_CreateByName(dbv.ptszVal, dwFlags);
+ HANDLE res = TimeZone_CreateByName(dbv.pwszVal, dwFlags);
db_free(&dbv);
if (res) return res;
}
@@ -250,7 +250,7 @@ MIR_CORE_DLL(HANDLE) TimeZone_CreateByContact(MCONTACT hContact, LPCSTR szModule
if (timezone == -1) {
char *szProto = GetContactProto(hContact);
if (!db_get_ws(hContact, szProto, "TzName", &dbv)) {
- HANDLE res = TimeZone_CreateByName(dbv.ptszVal, dwFlags);
+ HANDLE res = TimeZone_CreateByName(dbv.pwszVal, dwFlags);
db_free(&dbv);
if (res) return res;
}