diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-08-08 14:40:26 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-08-09 08:54:18 +0000 |
commit | 29c0b01831c1f174a2355714ec9601af52dc9443 (patch) | |
tree | f626dcec639d8a4f6e9ffb05853245512d87bc28 /src/qml/jsruntime/qv4runtime.cpp | |
parent | b6f393259ca014fa8c6419f6d7e608e279fa7913 (diff) |
Fix String(-0)
According to the spec, this should give "0", not "-0".
Change-Id: I7c1e2a777d41cdf13807f314c2adcc5e7ed1c757
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index a69874cacb..f3d166d695 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -259,7 +259,7 @@ void RuntimeHelpers::numberToString(QString *result, double num, int radix) result->append(QString(decpt - result->length(), zero)); } - if (sign) + if (sign && num) result->prepend(QLatin1Char('-')); return; |