From 4bc88d46fa9859615521f436511d4f102f20eb67 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Jul 2012 14:11:28 +0000 Subject: databases are still static, but are controlled via classes git-svn-id: http://svn.miranda-ng.org/main/trunk@1014 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_tree/DataBase.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'plugins/Dbx_tree/DataBase.cpp') diff --git a/plugins/Dbx_tree/DataBase.cpp b/plugins/Dbx_tree/DataBase.cpp index 101d4b5d34..b685981037 100644 --- a/plugins/Dbx_tree/DataBase.cpp +++ b/plugins/Dbx_tree/DataBase.cpp @@ -29,13 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. CDataBase *gDataBase = NULL; -CDataBase::CDataBase(const char* FileName) +CDataBase::CDataBase(const TCHAR *FileName) { - int len; - - len = MultiByteToWideChar(CP_ACP, 0, FileName, -1, NULL, 0); + int len = _tcslen(FileName); m_FileName[0] = new TCHAR[len + 1]; - MultiByteToWideChar(CP_ACP, 0, FileName, -1, m_FileName[0], len + 1); + _tcsncpy_s(m_FileName[0], len + 1, FileName, len); m_FileName[0][len] = 0; -- cgit v1.2.3