Switch one FXSYS_wcstof() caller to StringToFloat()
Since FXSYS_wcstof() and StringToFloat() are basically the same, switch
the FXSYS_wcstof() caller that does not care about the amount of string
parsed to use StringToFloat().
Change-Id: I18fdccef5bb49dc402979705b0ae6f8568d86fbf
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/128451
Reviewed-by: Thomas Sepez <tsepez@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp
index 4b672a3..bf11ad8 100644
--- a/fxjs/xfa/cjx_object.cpp
+++ b/fxjs/xfa/cjx_object.cpp
@@ -239,8 +239,7 @@
SetBoolean(eAttr, !wsValue.EqualsASCII("0"), bNotify);
break;
case XFA_AttributeType::Integer:
- SetInteger(eAttr,
- FXSYS_roundf(FXSYS_wcstof(wsValue.AsStringView(), nullptr)),
+ SetInteger(eAttr, FXSYS_roundf(StringToFloat(wsValue.AsStringView())),
bNotify);
break;
case XFA_AttributeType::Measure: