The fractionDigits parameter was unfortunately ignored, due to an accidental
double variable declaration, the latter in a narrower scope shadowing the
former in the correct scope.
Task-number: QTBUG-38577
Change-Id: I28f35466d2d744e84b86a3ca6b3371eb86869b55
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
int fdigits = -1;
if (ctx->callData->argc && !ctx->callData->args[0].isUndefined()) {
- int fdigits = ctx->callData->args[0].toInt32();
+ fdigits = ctx->callData->args[0].toInt32();
if (fdigits < 0 || fdigits > 20) {
ScopedString error(scope, ctx->engine->newString(QStringLiteral("Number.prototype.toExponential: fractionDigits out of range")));
return ctx->throwRangeError(error);