diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -87,9 +87,8 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM DWORD code;
string::size_type p = 0, p2 = 0, stop = 0;
{
- TCHAR cmd[512];
- _tcscpy(cmd, _T("--list-secret-keys"));
- pxExecute(cmd, "", &out, &code);
+ wstring cmd = _T("--list-secret-keys");
+ pxExecute(&cmd, "", &out, &code);
}
cp866_to_cp1251(&out);
while(p != string::npos)
@@ -151,10 +150,9 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM {
string out;
DWORD code;
- TCHAR cmd[64];
- _tcscpy(cmd, _T("--export -a "));
- _tcscat(cmd, fp);
- pxExecute(cmd, "", &out, &code);
+ wstring cmd = _T("--export -a ");
+ cmd += fp;
+ pxExecute(&cmd, "", &out, &code);
DBWriteContactSettingString(NULL, szModuleName, "GPGPubKey", out.c_str());
}
DestroyWindow(hwndDlg);
|