Skip to content

Commit 7d9de4b

Browse files
Fix index lookup for boundary
1 parent a49eb46 commit 7d9de4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Flow.Launcher.Infrastructure/TranslationMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void AddNewIndex(int translatedIndex, int length)
2121
public int MapToOriginalIndex(int translatedIndex)
2222
{
2323
var searchResult = _originalToTranslated.BinarySearch(translatedIndex);
24-
return searchResult >= 0 ? searchResult : ~searchResult;
24+
return searchResult >= 0 ? searchResult + 1 : ~searchResult;
2525
}
2626

2727
public void EndConstruct()

0 commit comments

Comments
 (0)