Skip to content

Commit 3f18627

Browse files
Fix zero boundary condition in MapToOriginalIndex
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 1302021 commit 3f18627

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Flow.Launcher.Infrastructure/TranslationMapping.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ public void AddNewIndex(int translatedIndex, int length)
2323
public int MapToOriginalIndex(int translatedIndex)
2424
{
2525
int loc = originalToTranslated.BinarySearch(translatedIndex);
26-
27-
return loc > 0 ? loc : ~loc;
26+
return loc >= 0 ? loc : ~loc;
2827
}
2928

3029
public void endConstruct()

0 commit comments

Comments
 (0)