summaryrefslogtreecommitdiff
path: root/src/core/stdfile
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/core/stdfile
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/core/stdfile')
-rw-r--r--src/core/stdfile/src/fileopts.cpp2
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp4
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/core/stdfile/src/fileopts.cpp b/src/core/stdfile/src/fileopts.cpp
index 6e98fb682c..41d8717635 100644
--- a/src/core/stdfile/src/fileopts.cpp
+++ b/src/core/stdfile/src/fileopts.cpp
@@ -91,7 +91,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
DBVARIANT dbv;
if (db_get_ws(NULL, MODULENAME, "ScanCmdLine", &dbv) == 0) {
- SetDlgItemText(hwndDlg, IDC_SCANCMDLINE, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_SCANCMDLINE, dbv.pwszVal);
db_free(&dbv);
}
else if (SendDlgItemMessage(hwndDlg, IDC_SCANCMDLINE, CB_GETCOUNT, 0, 0)) {
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 3db0e42786..e975d01fe8 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -216,7 +216,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
DBVARIANT dbv;
if (db_get_ws(NULL, MODULENAME, idstr, &dbv))
break;
- SendDlgItemMessage(hwndDlg, IDC_FILEDIR, CB_ADDSTRING, 0, (LPARAM)dbv.ptszVal);
+ SendDlgItemMessage(hwndDlg, IDC_FILEDIR, CB_ADDSTRING, 0, (LPARAM)dbv.pwszVal);
db_free(&dbv);
}
@@ -315,7 +315,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
mir_snprintf(idstr, "MruDir%d", i);
if (db_get_ws(NULL, MODULENAME, idstr, &dbv)) continue;
mir_snprintf(idstr, "MruDir%d", i+1);
- db_set_ws(NULL, MODULENAME, idstr, dbv.ptszVal);
+ db_set_ws(NULL, MODULENAME, idstr, dbv.pwszVal);
db_free(&dbv);
}
db_set_ws(NULL, MODULENAME, idstr, szRecvDir);
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index 841d2d0c2c..35d6884ad0 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -95,18 +95,18 @@ static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info)
{
DBVARIANT dbv;
if (!db_get_ws(NULL, MODULENAME, "ScanCmdLine", &dbv)) {
- if (dbv.ptszVal[0]) {
+ if (dbv.pwszVal[0]) {
STARTUPINFO si = { 0 };
si.cb = sizeof(si);
- wchar_t *pszReplace = wcsstr(dbv.ptszVal, L"%f");
+ wchar_t *pszReplace = wcsstr(dbv.pwszVal, L"%f");
wchar_t szCmdLine[768];
if (pszReplace) {
if (info->szFile[mir_wstrlen(info->szFile) - 1] == '\\')
info->szFile[mir_wstrlen(info->szFile) - 1] = '\0';
*pszReplace = 0;
- mir_snwprintf(szCmdLine, L"%s\"%s\"%s", dbv.ptszVal, info->szFile, pszReplace + 2);
+ mir_snwprintf(szCmdLine, L"%s\"%s\"%s", dbv.pwszVal, info->szFile, pszReplace + 2);
} else
- wcsncpy_s(szCmdLine, dbv.ptszVal, _TRUNCATE);
+ wcsncpy_s(szCmdLine, dbv.pwszVal, _TRUNCATE);
PROCESS_INFORMATION pi;
if (CreateProcess(nullptr, szCmdLine, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &si, &pi)) {