[Scummvm-cvs-logs] scummvm master -> a1dea147bba16006b1fb45f9ae22b7d7a008d99e

bluegr bluegr at gmail.com
Tue Feb 18 23:43:43 CET 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5d0ebad996 WME: Fix bug #6531 - "WME: Art of Murder - Assertion"
a1dea147bb WME: Remove translation tags from names found by the fallback detector


Commit: 5d0ebad9968898377f65bd233332afadaf106b19
    https://github.com/scummvm/scummvm/commit/5d0ebad9968898377f65bd233332afadaf106b19
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-02-18T14:42:10-08:00

Commit Message:
WME: Fix bug #6531 - "WME: Art of Murder - Assertion"

Changed paths:
    engines/wintermute/base/scriptables/script_ext_string.cpp



diff --git a/engines/wintermute/base/scriptables/script_ext_string.cpp b/engines/wintermute/base/scriptables/script_ext_string.cpp
index dae0a0d..bc0c658 100644
--- a/engines/wintermute/base/scriptables/script_ext_string.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_string.cpp
@@ -298,7 +298,9 @@ bool SXString::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
 
 		uint32 start = 0;
 		for(uint32 i = 0; i < str.size() + 1; i++) {
-			uint32 ch = str[i];
+			// The [] operator doesn't allow access to the zero code terminator
+			// (bug #6531)
+			uint32 ch = (i == str.size()) ? '\0' : str[i];
 			if (ch =='\0' || delims.contains(ch)) {
 				if (i != start) {
 					parts.push_back(WideString(str.c_str() + start, i - start + 1));


Commit: a1dea147bba16006b1fb45f9ae22b7d7a008d99e
    https://github.com/scummvm/scummvm/commit/a1dea147bba16006b1fb45f9ae22b7d7a008d99e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-02-18T14:42:12-08:00

Commit Message:
WME: Remove translation tags from names found by the fallback detector

Fixes cases like bug #6532

Changed paths:
    engines/wintermute/wintermute.cpp



diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 31e5995..81b6e53 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;
 				}
 			}






More information about the Scummvm-git-logs mailing list