[Scummvm-git-logs] scummvm master -> 9828447be4dc9ed7203312aac26fd8a9e2cd8b35
sluicebox
noreply at scummvm.org
Fri Mar 1 02:29:16 UTC 2024
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:
9828447be4 AGI: Fix missing words from our dictionary
Commit: 9828447be4dc9ed7203312aac26fd8a9e2cd8b35
https://github.com/scummvm/scummvm/commit/9828447be4dc9ed7203312aac26fd8a9e2cd8b35
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-02-29T19:29:11-07:00
Commit Message:
AGI: Fix missing words from our dictionary
This fixes bug #15000 "V Demo does not recognize valid word ammunition"
Our code was actually not parsing correctly many (all?) words starting with "a" in this particular game.
Changed paths:
engines/agi/words.cpp
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index c7b0320345d..cbb75b253ec 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -80,6 +80,8 @@ int Words::loadDictionary(const char *fname) {
// Loop through alphabet, as words in the dictionary file are sorted by
// first character
+ char str[64] = { 0 };
+ char c;
for (int i = 0; i < 26; i++) {
fp.seek(i * 2, SEEK_SET);
int offset = fp.readUint16BE();
@@ -89,7 +91,6 @@ int Words::loadDictionary(const char *fname) {
int k = fp.readByte();
while (!fp.eos() && !fp.err()) {
// Read next word
- char c, str[64];
do {
c = fp.readByte();
str[k++] = (c ^ 0x7F) & 0x7F;
@@ -106,6 +107,8 @@ int Words::loadDictionary(const char *fname) {
newWord->word = Common::String(str, k);
newWord->id = fp.readUint16BE();
_dictionaryWords[i].push_back(newWord);
+ } else {
+ fp.readUint16BE();
}
k = fp.readByte();
More information about the Scummvm-git-logs
mailing list