summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 2996316d79..09815413ad 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -1762,7 +1762,7 @@ bool CJS_PublicMethods::AFExtractNums(CJS_Runtime* pRuntime,
}
CFX_WideString str = params[0].ToCFXWideString(pRuntime);
- if (str[0] == L'.' || str[0] == L',')
+ if (str.GetLength() > 0 && (str[0] == L'.' || str[0] == L','))
str = L"0" + str;
CFX_WideString sPart;