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 /plugins/Exchange/src | |
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 'plugins/Exchange/src')
-rw-r--r-- | plugins/Exchange/src/utils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp index 96153d13b1..75b4ef4b93 100644 --- a/plugins/Exchange/src/utils.cpp +++ b/plugins/Exchange/src/utils.cpp @@ -115,11 +115,11 @@ int GetStringFromDatabase(char *szSettingName, wchar_t *szError, wchar_t *szResu dbv.type = DBVT_ASCIIZ;
if (db_get_ws(NULL, MODULENAME, szSettingName, &dbv) == 0) {
res = 0;
- size_t tmp = mir_wstrlen(dbv.ptszVal);
+ size_t tmp = mir_wstrlen(dbv.pwszVal);
size_t len = (tmp < size - 1) ? tmp : size - 1;
- wcsncpy(szResult, dbv.ptszVal, len);
+ wcsncpy(szResult, dbv.pwszVal, len);
szResult[len] = '\0';
- mir_free(dbv.ptszVal);
+ mir_free(dbv.pwszVal);
}
else {
res = 1;
|