Fix formatting -0.0 by %+f displays +-0.0

(cherry picked from commit aa311320d9)
This commit is contained in:
Poommetee Ketson 2018-11-09 15:27:06 +07:00 committed by Rémi Verschelde
parent e689fe0451
commit 0f5538e44d
1 changed files with 1 additions and 1 deletions

View File

@ -3929,7 +3929,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, "+");
}