mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:17:46 +00:00
Assistant: Fix adding sequential bonus in Fuzzy Match
It was comparing if they both had the same index position (which was always false).
This commit is contained in:
parent
5e10cd364b
commit
d40c36a16e
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ static int calculate_score(String const& string, u8* index_points, size_t index_
|
|||
continue;
|
||||
|
||||
u8 previous_idx = index_points[i - 1];
|
||||
if (current_idx == previous_idx)
|
||||
if (current_idx - 1 == previous_idx)
|
||||
out_score += SEQUENTIAL_BONUS;
|
||||
|
||||
u32 current_character = string[current_idx];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue