1
Fork 0
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:
Karol Kosek 2021-10-14 18:37:31 +02:00 committed by Andreas Kling
parent 5e10cd364b
commit d40c36a16e

View file

@ -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];