Skip to content

Commit

Permalink
Assistant: Fix adding sequential bonus in Fuzzy Match
Browse files Browse the repository at this point in the history
It was comparing if they both had the same index position (which was
always false).
  • Loading branch information
krkk authored and awesomekling committed Oct 25, 2021
1 parent 5e10cd3 commit d40c36a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Applications/Assistant/FuzzyMatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit d40c36a

Please sign in to comment.