diff options
author | Filippos Karapetis | 2011-09-29 01:59:48 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-09-29 02:00:31 +0300 |
commit | 57177e98aaf507ea8d507f8b1c7a45a7fce06392 (patch) | |
tree | ed78c3023cbbaed5214107702e5d6e4c3c1860c6 /engines/parallaction | |
parent | 26d4e4bdb6a879c841702a3b2daa7efc7a166eb6 (diff) | |
download | scummvm-rg350-57177e98aaf507ea8d507f8b1c7a45a7fce06392.tar.gz scummvm-rg350-57177e98aaf507ea8d507f8b1c7a45a7fce06392.tar.bz2 scummvm-rg350-57177e98aaf507ea8d507f8b1c7a45a7fce06392.zip |
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.
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/parallaction.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index a37c4439a1..19e74f6123 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; } } |