Closed PulkitParangat closed 2 years ago
I've just run into this issue. The problem also happens if you highlight all existing text and tap delete. The if
statement needs to also ensure the text view has at least one character in it before trying to access the character at length - 1
.
We've run into the same issue :(
@yackle any chance that PR can be merged??
@az-oolloow Could you open PR on this repository?
@yackle I faced this issue too and open a PR at https://github.com/yackle/CLImageEditor/pull/238, please let me know if this could be merged
Select Text -> Click New -> type Qwerty. Now start deleting the characters. App will crash when you'll delete last character Q. Reason for crash is '-[__NSCFConstantString characterAtIndex:]: Range or index out of bounds'
in CLTextSettingView.m in -(void)textViewDidChange:(UITextView*)textView
Here's the line of code causing crash: (Line No. 304) if(selection.location+selection.length == textView.text.length && [textView.text characterAtIndex:textView.text.length-1] == '\n') {