From e5f5a71d273c34aa817ac14c505ca10d6f019733 Mon Sep 17 00:00:00 2001 From: Chaosus Date: Sat, 25 May 2019 18:55:35 +0300 Subject: [PATCH] Fix "Index out of size" TextEdit's spam to output --- 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 acd2950b4c1..490ef00dc87 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4167,7 +4167,7 @@ void TextEdit::_scroll_moved(double p_to_val) { int v_scroll_i = floor(get_v_scroll()); int sc = 0; int n_line; - for (n_line = 0; n_line < text.size(); n_line++) { + for (n_line = 0; n_line < text.size() - 1; n_line++) { if (!is_line_hidden(n_line)) { sc++; sc += times_line_wraps(n_line);