summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/util.cpp')
-rw-r--r--fpdfsdk/javascript/util.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp
index 93e178e9b7..e00f9e1560 100644
--- a/fpdfsdk/javascript/util.cpp
+++ b/fpdfsdk/javascript/util.cpp
@@ -9,6 +9,7 @@
#include <time.h>
#include <algorithm>
+#include <cmath>
#include <cwctype>
#include <string>
#include <vector>
@@ -395,7 +396,7 @@ bool util::scand(CJS_Runtime* pRuntime,
dDate = CJS_PublicMethods::MakeRegularDate(sDate, sFormat, nullptr);
}
- if (!JS_PortIsNan(dDate)) {
+ if (!std::isnan(dDate)) {
vRet = CJS_Value(pRuntime, CJS_Date(pRuntime, dDate));
} else {
vRet.SetNull(pRuntime);