Explorar o código

Merge pull request #29174 from Chaosus/fix_line_wrap_output

Fix "Index out of size" TextEdit's spam to output (when using Expression nodes in the visual shaders)
Rémi Verschelde %!s(int64=6) %!d(string=hai) anos
pai
achega
556ee71277
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -4169,7 +4169,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);