Skip to content

Commit a211050

Browse files
Potential fix for code scanning alert no. 10: String length conflation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 60e367d commit a211050

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/InputMethodController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ extension McBopomofoInputMethodController {
721721
commit(text: previous.composingBuffer, client: client)
722722
}
723723
client.setMarkedText(
724-
composingBuffer, selectionRange: NSMakeRange(composingBuffer.count, 0),
724+
composingBuffer, selectionRange: NSMakeRange(NSString(string: composingBuffer).length, 0),
725725
replacementRange: NSMakeRange(NSNotFound, NSNotFound))
726726
}
727727

0 commit comments

Comments
 (0)