mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fix index out of bounds error
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user