aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorFilippos Karapetis2014-02-18 10:56:44 +0200
committerFilippos Karapetis2014-02-19 00:42:12 +0200
commita1dea147bba16006b1fb45f9ae22b7d7a008d99e (patch)
tree70f75386e5e53f5f76271125090cb0d0b5abf668 /engines/wintermute
parent5d0ebad9968898377f65bd233332afadaf106b19 (diff)
downloadscummvm-rg350-a1dea147bba16006b1fb45f9ae22b7d7a008d99e.tar.gz
scummvm-rg350-a1dea147bba16006b1fb45f9ae22b7d7a008d99e.tar.bz2
scummvm-rg350-a1dea147bba16006b1fb45f9ae22b7d7a008d99e.zip
WME: Remove translation tags from names found by the fallback detector
Fixes cases like bug #6532
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/wintermute.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 31e5995e2e..81b6e53c9f 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -365,6 +365,17 @@ bool WintermuteEngine::getGameInfo(const Common::FSList &fslist, Common::String
name = value;
} else if (key == "CAPTION") {
retVal = true;
+ // Remove any translation tags, if they are included in the game description.
+ // This can potentially remove parts of a string that has translation tags
+ // and contains a "/" in its description (e.g. /tag/Name start / name end will
+ // result in "name end"), but it's a very rare case, and this code is just used
+ // for fallback anyway.
+ if (value.hasPrefix("/")) {
+ value.deleteChar(0);
+ while (value.contains("/")) {
+ value.deleteChar(0);
+ }
+ }
caption = value;
}
}