aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorNicolas Bacca2005-03-16 22:58:42 +0000
committerNicolas Bacca2005-03-16 22:58:42 +0000
commitd99d4d09f259c1ce6e679c4e5b09eaf0e6014694 (patch)
treed583e930963f60fbbd8b66146fd120fbb08ce7e2 /backends/fs
parenta7d2552cfd96aff25301d82a57b8463413a48b69 (diff)
downloadscummvm-rg350-d99d4d09f259c1ce6e679c4e5b09eaf0e6014694.tar.gz
scummvm-rg350-d99d4d09f259c1ce6e679c4e5b09eaf0e6014694.tar.bz2
scummvm-rg350-d99d4d09f259c1ce6e679c4e5b09eaf0e6014694.zip
Weird ... but fixes the second (and hopefully last) crash
svn-id: r17168
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/windows/windows-fs.cpp10
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
}