diff options
author | Tobia Tesan | 2016-03-06 11:33:06 +0100 |
---|---|---|
committer | Tobia Tesan | 2016-03-06 11:36:49 +0100 |
commit | 891986fd2be496834ce5c8dc54f0dd09d3271f95 (patch) | |
tree | 3e8f1f1ca83d690b53ac5e33a0c11491566dd8d8 | |
parent | 5ad4eca257c975a895153d162ff6f3cdc1ef4afb (diff) | |
download | scummvm-rg350-891986fd2be496834ce5c8dc54f0dd09d3271f95.tar.gz scummvm-rg350-891986fd2be496834ce5c8dc54f0dd09d3271f95.tar.bz2 scummvm-rg350-891986fd2be496834ce5c8dc54f0dd09d3271f95.zip |
WINTERMUTE: Use C strings in absolute path workaround array
-rw-r--r-- | engines/wintermute/base/file/base_disk_file.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp index 74ed7960a1..d0c51616f4 100644 --- a/engines/wintermute/base/file/base_disk_file.cpp +++ b/engines/wintermute/base/file/base_disk_file.cpp @@ -117,7 +117,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) { // The original interpreter on Windows usually simply ignores them when it can't find them. // We try to turn the known ones into relative paths. if (fixedFilename.contains(':')) { - Common::String knownPrefixes[] = { // Known absolute paths + const char* const knownPrefixes[] = { // Known absolute paths "c:/windows/fonts/", // East Side Story refers to "c:\windows\fonts\framd.ttf" "c:/carol6/svn/data/", // Carol Reed 6: Black Circle refers to "c:\carol6\svn\data\sprites\system\help.png" "f:/dokument/spel 5/demo/data/" // Carol Reed 5 (non-demo) refers to "f:\dokument\spel 5\demo\data\scenes\credits\op_cred_00\op_cred_00.jpg" @@ -127,7 +127,7 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) { for (uint i = 0; i < ARRAYSIZE(knownPrefixes); i++) { if (fixedFilename.hasPrefix(knownPrefixes[i])) { - fixedFilename = filename.c_str() + knownPrefixes[i].size(); + fixedFilename = fixedFilename.c_str() + strlen(knownPrefixes[i]); matched = true; } } |