From 3f1862775eaa9c4c662118a0aede69126ee3301f Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sun, 13 Jul 2025 19:33:20 +0800 Subject: [PATCH] Fix zero boundary condition in MapToOriginalIndex Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- Flow.Launcher.Infrastructure/TranslationMapping.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/TranslationMapping.cs b/Flow.Launcher.Infrastructure/TranslationMapping.cs index 58754cf90..3a3ca6e2f 100644 --- a/Flow.Launcher.Infrastructure/TranslationMapping.cs +++ b/Flow.Launcher.Infrastructure/TranslationMapping.cs @@ -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()