diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
commit | d296f9f99daf102b9af5d56690e2bd00d61c1267 (patch) | |
tree | 39311caaf80abf0b47ecb78cf94dc8157b193575 /src/mir_core | |
parent | ffc521e5d5e9bd66feb65afe0046b3fc7e073356 (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.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/timezones.cpp | 4 |
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;
}
|