[Scummvm-git-logs] scummvm master -> 23ed97401559d3f874996d318d237795be5107b2
bluegr
noreply at scummvm.org
Thu Sep 26 07:39:04 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:
23ed974015 GLK: ADVSYS: Fix verb parsing
Commit: 23ed97401559d3f874996d318d237795be5107b2
https://github.com/scummvm/scummvm/commit/23ed97401559d3f874996d318d237795be5107b2
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-09-26T10:39:01+03:00
Commit Message:
GLK: ADVSYS: Fix verb parsing
Previously Game::findWord() assumed words of fixed length (6)
Games like "one hand" and "pirating" failed to parse correctly most verbs, because the code would only work with words of the max length (6).
The issue was mentioned on the ScummVM forums here: https://forums.scummvm.org/viewtopic.php?p=99918#p99918
Changed paths:
engines/glk/advsys/game.cpp
diff --git a/engines/glk/advsys/game.cpp b/engines/glk/advsys/game.cpp
index 211d71e2f4d..84246c18f0a 100644
--- a/engines/glk/advsys/game.cpp
+++ b/engines/glk/advsys/game.cpp
@@ -176,7 +176,7 @@ void Game::loadGameData(Common::ReadStream &rs) {
int Game::findWord(const Common::String &word) const {
// Limit the word to the maximum allowable size
- Common::String w(word.c_str(), word.c_str() + WORD_SIZE);
+ Common::String w(word.c_str(), MIN(word.size(), (uint)WORD_SIZE));
// Iterate over the dictionary for the word
for (int idx = 1; idx <= _wordCount; ++idx) {
More information about the Scummvm-git-logs
mailing list