summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorDominik 'dreamsComeTrue' Jasiński <dominikjasinski@o2.pl>2020-10-17 17:56:48 +0200
committerDominik 'dreamsComeTrue' Jasiński <dominikjasinski@o2.pl>2020-10-17 17:59:15 +0200
commit99c8a0791916d6fe11763f54eeaef0c850112c0f (patch)
treee613cf5adf9e7efd94d97974bafec7c4408880aa /scene
parent5b6a22e275ef8d8e2ad3b1e8074af4b30c076c27 (diff)
TextEdit - fix valid bounds in 'set_line'. Fixes #41967
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 957e1c11c7..dc21980473 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -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());