Преглед изворни кода

Label::set_lines_skipped Fail if passed a negative value

(cherry picked from commit d7bb7cad47485e81f1d4b6bca42101d0613da0d6)
kleonc пре 4 година
родитељ
комит
566ad4fd22
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      scene/gui/label.cpp

+ 1 - 1
scene/gui/label.cpp

@@ -630,7 +630,7 @@ float Label::get_percent_visible() const {
 }
 
 void Label::set_lines_skipped(int p_lines) {
-
+	ERR_FAIL_COND(p_lines < 0);
 	lines_skipped = p_lines;
 	update();
 }