From 566ad4fd22053b7572542355ef0f7c7e36142402 Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Sun, 21 Feb 2021 14:03:28 +0100 Subject: [PATCH] Label::set_lines_skipped Fail if passed a negative value (cherry picked from commit d7bb7cad47485e81f1d4b6bca42101d0613da0d6) --- scene/gui/label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 731cb952b90..ae96cc5d85c 100644 --- a/scene/gui/label.cpp +++ b/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(); }