summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp
index 8fe5199dee..4b3b5e2ab1 100644
--- a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp
@@ -957,9 +957,8 @@ void CXFA_FM2JSContext::Round(CFXJSE_Value* pThis,
uPrecision = static_cast<uint8_t>(pdfium::clamp(dPrecision, 0.0, 12.0));
}
- CFX_Decimal decimalValue((float)dValue, uPrecision);
- CFX_WideString wsValue = decimalValue;
- args.GetReturnValue()->SetString(wsValue.UTF8Encode().AsStringC());
+ CFX_Decimal decimalValue(static_cast<float>(dValue), uPrecision);
+ args.GetReturnValue()->SetDouble(decimalValue);
}
// static