summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/PublicMethods.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.cpp')
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 7ede42db13..e898214cd8 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -6,7 +6,6 @@
#include "PublicMethods.h"
-#include "../../../core/include/fxcrt/fx_ext.h"
#include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "../../include/javascript/IJavaScript.h"
#include "Field.h"
@@ -117,7 +116,7 @@ FX_BOOL CJS_PublicMethods::IsDigit(wchar_t ch) {
}
FX_BOOL CJS_PublicMethods::IsDigit(char ch) {
- return std::isdigit(ch);
+ return (ch >= '0' && ch <= '9');
}
FX_BOOL CJS_PublicMethods::IsAlphabetic(wchar_t ch) {
@@ -397,7 +396,7 @@ int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& string,
FX_WCHAR c = string.GetAt(i);
if (IsDigit((wchar_t)c)) {
- nRet = nRet * 10 + FXSYS_toDecimalDigit(c);
+ nRet = nRet * 10 + (c - '0');
nSkip = i - nStart + 1;
if (nSkip >= nMaxStep)
break;