Fix formatting -0.0 by %+f displays +-0.0
This commit is contained in:
parent
da1f53c8d9
commit
aa311320d9
|
@ -4035,7 +4035,7 @@ String String::sprintf(const Array &values, bool *error) const {
|
||||||
str = str.pad_decimals(min_decimals);
|
str = str.pad_decimals(min_decimals);
|
||||||
|
|
||||||
// Show sign
|
// Show sign
|
||||||
if (show_sign && value >= 0) {
|
if (show_sign && str.left(1) != "-") {
|
||||||
str = str.insert(0, "+");
|
str = str.insert(0, "+");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue