diff options
author | Alyssa Milburn | 2012-07-08 10:27:31 +0200 |
---|---|---|
committer | Alyssa Milburn | 2012-07-08 10:28:44 +0200 |
commit | 87b79f2124a1d13cfd3a62d9a526d1770a340b19 (patch) | |
tree | 2567b258723aea177dc5bd05ba57634547c3fab2 | |
parent | e265be07bfb03ee9686ea27b2e12bf4d61ad3732 (diff) | |
download | scummvm-rg350-87b79f2124a1d13cfd3a62d9a526d1770a340b19.tar.gz scummvm-rg350-87b79f2124a1d13cfd3a62d9a526d1770a340b19.tar.bz2 scummvm-rg350-87b79f2124a1d13cfd3a62d9a526d1770a340b19.zip |
COMPOSER: Fix parsing v1 book groups.
This fixes bug #3539019.
-rw-r--r-- | engines/composer/composer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index 556dad7e94..23a9d2ff85 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -381,11 +381,17 @@ void ComposerEngine::loadLibrary(uint id) { filename = getStringFromConfig(_bookGroup, Common::String::format("%d", id)); filename = mangleFilename(filename); + // bookGroup is the basename of the path. + // TODO: tidy this up. _bookGroup.clear(); for (uint i = 0; i < filename.size(); i++) { - if (filename[i] == '\\' || filename[i] == ':') + if (filename[i] == '~' || filename[i] == '/' || filename[i] == ':') continue; for (uint j = 0; j < filename.size(); j++) { + if (filename[j] == '/') { + _bookGroup.clear(); + continue; + } if (filename[j] == '.') break; _bookGroup += filename[j]; |