Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: fpdfsdk/javascript/PublicMethods.cpp

Issue 1977613002: Fix use of an uninitialised CFX_Widestring in AFNumber_Keystroke. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: minor clenaup Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/PublicMethods.cpp
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 2b14b772aad8ff36875902fc644e1fb61ddd8ab9..fa7b5d4d3627b12563c7d6fa842bb162550bd89f 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698