From e060779f0f9f76b9ffb4082c20d7c2b3a86c1513 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 8 Sep 2010 01:32:19 +0300 Subject: is this first really stable build ? --- messages.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'messages.cpp') diff --git a/messages.cpp b/messages.cpp index 08b7666..18db824 100644 --- a/messages.cpp +++ b/messages.cpp @@ -298,10 +298,10 @@ int RecvMsgSvc(WPARAM w, LPARAM l) wstring path = tmp2; mir_free(tmp2); path += _T("\\decrypted_data"); - fstream f(path.c_str(), std::ios::in | std::ios::ate); + fstream f(path.c_str(), std::ios::in | std::ios::ate | std::ios::binary); if(f.is_open()) { - std::ifstream::pos_type size = f.tellg(); + std::wifstream::pos_type size = f.tellg(); char *tmp = new char [(std::ifstream::pos_type)size+(std::ifstream::pos_type)1]; f.seekg(0, std::ios::beg); f.read(tmp, size); @@ -462,11 +462,11 @@ int SendMsgSvc(WPARAM w, LPARAM l) } DeleteFile(path.c_str()); path.append(_T(".asc")); - wfstream f(path.c_str(), std::ios::in | std::ios::ate); + wfstream f(path.c_str(), std::ios::in | std::ios::ate | std::ios::binary); str.clear(); if(f.is_open()) { - std::ifstream::pos_type size = f.tellg(); + std::wifstream::pos_type size = f.tellg(); TCHAR *tmp = new TCHAR [(std::ifstream::pos_type)size+(std::ifstream::pos_type)1]; f.seekg(0, std::ios::beg); f.read(tmp, size); -- cgit v1.2.3