diff options
-rw-r--r-- | backends/fs/windows/windows-fs.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp index 42300f62c2..38f00b68f2 100644 --- a/backends/fs/windows/windows-fs.cpp +++ b/backends/fs/windows/windows-fs.cpp @@ -54,7 +54,7 @@ public: private: static char *toAscii(TCHAR *x); - static const TCHAR* toUnicode(const char *x); + static TCHAR* toUnicode(const char *x); static void addFile (FSList &list, ListMode mode, const char *base, WIN32_FIND_DATA* find_data); }; @@ -70,12 +70,12 @@ char* WindowsFilesystemNode::toAscii(TCHAR *x) { #endif } -const TCHAR* WindowsFilesystemNode::toUnicode(const char *x) { +TCHAR* WindowsFilesystemNode::toUnicode(const char *x) { #ifndef UNICODE - return (const TCHAR *)x; + return (TCHAR *)x; #else - static const TCHAR unicodeString[MAX_PATH]; - MultiByteToWideChar(CP_ACP, 0, x, strlen(x) + 1, (TCHAR *)unicodeString, sizeof(unicodeString)); + static TCHAR unicodeString[MAX_PATH]; + MultiByteToWideChar(CP_ACP, 0, x, strlen(x) + 1, unicodeString, sizeof(unicodeString) / sizeof(TCHAR)); return unicodeString; #endif } |