summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 2b14b772aa..fa7b5d4d36 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -903,11 +903,10 @@ FX_BOOL CJS_PublicMethods::AFNumber_Keystroke(
CFX_WideString wstrValue = val;
if (pEvent->WillCommit()) {
- CFX_WideString wstrValue = StrTrim(wstrValue);
- if (wstrValue.IsEmpty())
+ CFX_WideString swTemp = StrTrim(wstrValue);
+ if (swTemp.IsEmpty())
return TRUE;
- CFX_WideString swTemp = wstrValue;
swTemp.Replace(L",", L".");
if (!IsNumber(swTemp.c_str())) {
pEvent->Rc() = FALSE;