Fix zero boundary condition in MapToOriginalIndex

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
VictoriousRaptor 2025-07-13 19:33:20 +08:00 committed by GitHub
parent 130202108c
commit 3f1862775e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,8 +23,7 @@ namespace Flow.Launcher.Infrastructure
public int MapToOriginalIndex(int translatedIndex)
{
int loc = originalToTranslated.BinarySearch(translatedIndex);
return loc > 0 ? loc : ~loc;
return loc >= 0 ? loc : ~loc;
}
public void endConstruct()