[Scummvm-cvs-logs] scummvm master -> b1a7492da88460ff13795fe16ed630ecb2489944
wjp
wjp at usecode.org
Tue Oct 1 20:28:46 CEST 2013
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:
b1a7492da8 AGI: Skip words starting with digits that are filed under 'a' in the dictionary.
Commit: b1a7492da88460ff13795fe16ed630ecb2489944
https://github.com/scummvm/scummvm/commit/b1a7492da88460ff13795fe16ed630ecb2489944
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-10-01T10:58:51-07:00
Commit Message:
AGI: Skip words starting with digits that are filed under 'a' in the dictionary.
The fan game SQ0 does this (for '7up', among others), and this caused us
to skip all words starting with an 'a'. Bug #3615061.
Changed paths:
engines/agi/words.cpp
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index 9c5b3d3..f423995 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -93,14 +93,25 @@ int AgiEngine::loadWords(const char *fname) {
} while (!(c & 0x80) && k < (int)sizeof(str) - 1);
str[k] = 0;
- // And store it in our internal dictionary
- AgiWord *w = new AgiWord;
- w->word = myStrndup(str, k);
- w->id = fp.readUint16BE();
- _game.words[i].push_back(w);
+ // WORKAROUND:
+ // The SQ0 fan game stores words starting with numbers (like '7up')
+ // in its dictionary under the 'a' entry. We skip these.
+ // See bug #3615061
+ if (str[0] == 'a' + i) {
+ // And store it in our internal dictionary
+ AgiWord *w = new AgiWord;
+ w->word = myStrndup(str, k);
+ w->id = fp.readUint16BE();
+ _game.words[i].push_back(w);
+ }
+
+ k = fp.readByte();
// Are there more words with an already known prefix?
- if (!(k = fp.readByte()))
+ // WORKAROUND: We only break after already seeing words with the
+ // right prefix, for the SQ0 words starting with digits filed under
+ // 'a'. See above comment and bug #3615061.
+ if (k == 0 && str[0] >= 'a' + i)
break;
}
}
More information about the Scummvm-git-logs
mailing list