[Scummvm-cvs-logs] scummvm master -> 57177e98aaf507ea8d507f8b1c7a45a7fce06392

bluegr md5 at scummvm.org
Thu Sep 29 01:07:14 CEST 2011


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

Summary:
57177e98aa PARALLACTION: Fixed bug #2969915 - "NIPPON: Disguise changing back and forth"


Commit: 57177e98aaf507ea8d507f8b1c7a45a7fce06392
    https://github.com/scummvm/scummvm/commit/57177e98aaf507ea8d507f8b1c7a45a7fce06392
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-28T16:00:31-07:00

Commit Message:
PARALLACTION: Fixed bug #2969915 - "NIPPON: Disguise changing back and forth"

A regression from commit 18b48c7. The name of the normal Donna actor is
"donna", whereas it's "donnatras" for the disguised one, so strstr()
seems to be wrong here. This fixes the bug and it shouldn't cause any
further regressions. Also, changed the relevant code to conform to our
code convention guidelines - it's quite a bad idea to not enclose a
whole big code block in brackets, as it becomes hard to read.

Changed paths:
    engines/parallaction/parallaction.cpp



diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index a37c443..19e74f6 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -899,22 +899,23 @@ void CharacterName::bind(const char *name) {
 	_dummy = IS_DUMMY_CHARACTER(name);
 
 	if (!_dummy) {
-		if (!strstr(name, "donna")) {
+		if (!strcmp(name, "donna")) {
 			_engineFlags &= ~kEngineTransformedDonna;
-		} else
-		if (_engineFlags & kEngineTransformedDonna) {
-			_suffix = _suffixTras;
 		} else {
-			const char *s = strstr(name, "tras");
-			if (s) {
-				_engineFlags |= kEngineTransformedDonna;
+			if (_engineFlags & kEngineTransformedDonna) {
 				_suffix = _suffixTras;
-				end = s;
+			} else {
+				const char *s = strstr(name, "tras");
+				if (s) {
+					_engineFlags |= kEngineTransformedDonna;
+					_suffix = _suffixTras;
+					end = s;
+				}
+			}
+			if (IS_MINI_CHARACTER(name)) {
+				_prefix = _prefixMini;
+				begin = name+4;
 			}
-		}
-		if (IS_MINI_CHARACTER(name)) {
-			_prefix = _prefixMini;
-			begin = name+4;
 		}
 	}
 






More information about the Scummvm-git-logs mailing list