summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/PublicMethods.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/PublicMethods.cpp')
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 200e7d1046..867a265b80 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -1658,8 +1658,8 @@ bool CJS_PublicMethods::AFMakeNumber(CJS_Runtime* pRuntime,
WideString ws = pRuntime->ToWideString(params[0].ToV8Value());
ws.Replace(L",", L".");
- vRet = CJS_Value(pRuntime->NewString(ws.c_str()));
- vRet.MaybeCoerceToNumber(pRuntime);
+ vRet =
+ CJS_Value(pRuntime->MaybeCoerceToNumber(pRuntime->NewString(ws.c_str())));
if (!vRet.ToV8Value()->IsNumber())
vRet = CJS_Value(pRuntime->NewNumber(0));
return true;