summaryrefslogtreecommitdiffstats
path: root/core/ustring.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2018-11-09 15:27:06 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2018-11-09 15:27:06 +0700
commitaa311320d92b2982dd4606156882686cc354e551 (patch)
treed5377c5cda594de94701bc708328bd8cc77b5c09 /core/ustring.cpp
parentda1f53c8d995aeb393f67d9aeb8a0842751a1180 (diff)
downloadredot-engine-aa311320d92b2982dd4606156882686cc354e551.tar.gz
Fix formatting -0.0 by %+f displays +-0.0
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r--core/ustring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 2191bb5e23..3f017fa985 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -4035,7 +4035,7 @@ String String::sprintf(const Array &values, bool *error) const {
str = str.pad_decimals(min_decimals);
// Show sign
- if (show_sign && value >= 0) {
+ if (show_sign && str.left(1) != "-") {
str = str.insert(0, "+");
}