Fix index out of bounds error

This commit is contained in:
Twan van Laarhoven
2020-04-10 17:27:04 +02:00
parent f10ec682ad
commit 482c7103ed
+1
View File
@@ -1011,6 +1011,7 @@ void TextValueEditor::replaceSelection(const String& replacement, const String&
size_t best_cursor = expected_cursor;
if (real_value.size() < expected_value.size()
&& expected_cursor < expected_value.size()
&& start < real_value.size()
&& expected_value.GetChar(expected_cursor) == UNTAG_SEP
&& real_value.GetChar(start) == UNTAG_SEP
&& real_value.size() - end_min == start) {