From 82e4196bfcfe5fa976ef602f54fbaf82d3854f6d Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 12 Aug 2010 19:58:37 +0300 Subject: modified: main.cpp modified: messages.cpp --- main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 7d8ef1f..702a9b2 100644 --- a/main.cpp +++ b/main.cpp @@ -90,7 +90,8 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM TCHAR cmd[512]; _tcscpy(cmd, _T("--list-secret-keys")); pxExecute(cmd, "", &out, &code); - } + } + cp866_to_cp1251(&out); while(p != string::npos) { if((p = out.find("sec ", p)) == string::npos) @@ -112,11 +113,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM mir_free(tmp); p = out.find("uid ", p); p2 = out.find_first_not_of(" ", p+5); - p = out.find(" ", p2); + p = out.find("<", p2); tmp = mir_a2t(out.substr(p2,p-p2).c_str()); ListView_SetItemText(hwndList, iRow, 2, tmp); mir_free(tmp); - p = out.find("<", p) + 1; + p++; p2 = out.find(">", p); tmp = mir_a2t(out.substr(p,p2-p).c_str()); ListView_SetItemText(hwndList, iRow, 1, tmp); -- cgit v1.2.3