summaryrefslogtreecommitdiff
path: root/plugins/Dbx_tree/DataBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_tree/DataBase.cpp')
-rw-r--r--plugins/Dbx_tree/DataBase.cpp8
1 files changed, 3 insertions, 5 deletions
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;