aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/sci.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 900dabe05a..86c0cffe15 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -923,14 +923,19 @@ Common::String SciEngine::getFilePrefix() const {
}
Common::String SciEngine::wrapFilename(const Common::String &name) const {
- return getFilePrefix() + "-" + name;
+ Common::String prefix = getFilePrefix() + "-";
+ if (name.hasPrefix(prefix.c_str()))
+ return name;
+ else
+ return prefix + name;
}
Common::String SciEngine::unwrapFilename(const Common::String &name) const {
Common::String prefix = getFilePrefix() + "-";
if (name.hasPrefix(prefix.c_str()))
return Common::String(name.c_str() + prefix.size());
- return name;
+ else
+ return name;
}
const char *SciEngine::getGameObjectName() {