You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Merge pull request #42874 from dreamsComeTrue/text-edit-bounds-fix
TextEdit - fix valid bounds in 'set_line'.
This commit is contained in:
@@ -6406,7 +6406,7 @@ void TextEdit::set_tooltip_request_func(Object *p_obj, const StringName &p_funct
|
||||
}
|
||||
|
||||
void TextEdit::set_line(int line, String new_text) {
|
||||
if (line < 0 || line > text.size()) {
|
||||
if (line < 0 || line >= text.size()) {
|
||||
return;
|
||||
}
|
||||
_remove_text(line, 0, line, text[line].length());
|
||||
|
||||
Reference in New Issue
Block a user