summaryrefslogtreecommitdiff
path: root/plugins/Msg_Export
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-18 11:51:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-18 11:51:38 +0000
commit976508f30d0579e05d8ccd53be903b3cda89f508 (patch)
treea65671d1375d621110662adda8f0eb2c60053adf /plugins/Msg_Export
parent00f7de90210080e231b2f8c2a0bf39c8b0a048ac (diff)
various memory allocation problems
git-svn-id: http://svn.miranda-ng.org/main/trunk@4090 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Msg_Export')
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index b2339b8ec6..a2accf6a7d 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -540,16 +540,12 @@ bool bWriteHexToFile( HANDLE hFile, void * pData, int nSize )
// Developer : KN
/////////////////////////////////////////////////////////////////////
-
bool bReadMirandaDirAndPath()
{
- TCHAR szDBPath[MAX_PATH];
- char tmp[MAX_PATH];
- TCHAR *tmp2;
- _tcscpy( szDBPath, pszDbPathError );
- PathToAbsolute("miranda32.exe", tmp);
- tmp2 = mir_utf8decodeT(tmp);
- sMirandaPath = tmp2;
+ TCHAR szDBPath[MAX_PATH], tmp[MAX_PATH];
+ _tcscpy(szDBPath, pszDbPathError);
+ PathToAbsoluteT( _T("miranda32.exe"), tmp);
+ sMirandaPath = tmp;
sMirandaPath.erase(sMirandaPath.find_last_of(_T("\\")));
CallService(MS_DB_GETPROFILEPATHT, (WPARAM)MAX_PATH - 1, (LPARAM)szDBPath);
sDBPath = szDBPath;
@@ -577,8 +573,7 @@ void ReplaceDBPath( tstring &sRet )
ReplaceAll( sRet, _T("%dbpath%"), sDBPath );
// Try to firure out if it is a relative path ( ..\..\MsgExport\ )
if (sRet.size() <= 2 || ! ( sRet[1] == ':' ||
- ( sRet[0] == '\\' && sRet[1] == '\\'))
- )
+ ( sRet[0] == '\\' && sRet[1] == '\\')))
{
// Relative path
// we will prepend the mirande exe path to avoid problems