summaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r--scene/gui/label.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index fd174619d5..d47629b36b 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -789,10 +789,10 @@ int Label::get_visible_characters() const {
void Label::set_visible_ratio(float p_ratio) {
if (visible_ratio != p_ratio) {
- if (visible_ratio >= 1.0) {
+ if (p_ratio >= 1.0) {
visible_chars = -1;
visible_ratio = 1.0;
- } else if (visible_ratio < 0.0) {
+ } else if (p_ratio < 0.0) {
visible_chars = 0;
visible_ratio = 0.0;
} else {