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. --- plugins/Exchange/src/utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Exchange/src') 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; -- cgit v1.2.3