diff options
author | kleonc <9283098+kleonc@users.noreply.github.com> | 2021-02-21 14:03:28 +0100 |
---|---|---|
committer | kleonc <9283098+kleonc@users.noreply.github.com> | 2021-02-21 14:23:57 +0100 |
commit | d7bb7cad47485e81f1d4b6bca42101d0613da0d6 (patch) | |
tree | 9bac53d2e2b6c416238c912fde4be2c44ee8c2f6 /scene | |
parent | ff8a1fdc19842aaa52a23e303425f5a703e8317b (diff) |
Label::set_lines_skipped Fail if passed a negative value
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/label.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 2997a6ebe9..b98caf3562 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -566,6 +566,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_visible(); update(); |