diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/spin_box.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 3c63f6b2c7..172c366c41 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -53,7 +53,8 @@ void SpinBox::_text_entered(const String &p_string) { Ref<Expression> expr; expr.instance(); - Error err = expr->parse(p_string); + // Ignore the prefix and suffix in the expression + Error err = expr->parse(p_string.trim_prefix(prefix + " ").trim_suffix(" " + suffix)); if (err != OK) { return; } |