From 99c8a0791916d6fe11763f54eeaef0c850112c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=27dreamsComeTrue=27=20Jasi=C5=84ski?= Date: Sat, 17 Oct 2020 17:56:48 +0200 Subject: [PATCH] TextEdit - fix valid bounds in 'set_line'. Fixes #41967 --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 957e1c11c7f..dc219804737 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());