diff options
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 |