diff options
author | Alyssa Milburn | 2010-12-12 19:00:53 +0000 |
---|---|---|
committer | Alyssa Milburn | 2010-12-12 19:00:53 +0000 |
commit | 9e483b79ce6f0bb2b169c18ae16a6c820ab74c2c (patch) | |
tree | 70bda182a7bf63fe57ab76ba1ec704ee02f839a1 /engines | |
parent | 26c37051526e5e6c45dd5bf46cb9e3a06c065164 (diff) | |
download | scummvm-rg350-9e483b79ce6f0bb2b169c18ae16a6c820ab74c2c.tar.gz scummvm-rg350-9e483b79ce6f0bb2b169c18ae16a6c820ab74c2c.tar.bz2 scummvm-rg350-9e483b79ce6f0bb2b169c18ae16a6c820ab74c2c.zip |
MOHAWK: Skip CD-ROM titles in LB paths
svn-id: r54885
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/livingbooks.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 491fab2858..a0b3e39506 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -623,7 +623,15 @@ Common::String MohawkEngine_LivingBooks::convertMacFileName(const Common::String Common::String MohawkEngine_LivingBooks::convertWinFileName(const Common::String &string) { Common::String filename; - for (uint32 i = 0; i < string.size(); i++) { + uint32 i = 0; + if (string.hasPrefix("//")) { + // skip "//CD-ROM Title/" prefixes which we don't care about + i = 3; + while (i < string.size() && string[i - 1] != '/') + i++; + } + + for (; i < string.size(); i++) { if (string[i] == '\\') filename += '/'; else |