From 87b79f2124a1d13cfd3a62d9a526d1770a340b19 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sun, 8 Jul 2012 10:27:31 +0200 Subject: COMPOSER: Fix parsing v1 book groups. This fixes bug #3539019. --- engines/composer/composer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines/composer') 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]; -- cgit v1.2.3