mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
AGI: Fix predictive input binary search
Note that there are still issues with this input mode. If the binary search hits a prefix match before finding the full match, it won't recognize the full match. (Example: typing "buy" will show "buz" because it's aiming for "buzzard" without realizing "buy" exists.)
This commit is contained in:
@@ -570,7 +570,7 @@ bool AgiEngine::matchWord() {
|
||||
int hi = _predictiveDictLineCount - 1;
|
||||
int lo = 0;
|
||||
int line = 0;
|
||||
while (lo < hi) {
|
||||
while (lo <= hi) {
|
||||
line = (lo + hi) / 2;
|
||||
int cmpVal = strncmp(_predictiveDictLine[line], _currentCode.c_str(), _currentCode.size());
|
||||
if (cmpVal > 0)
|
||||
|
||||
Reference in New Issue
Block a user