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

Unified Diff: fpdfsdk/src/javascript/util.cpp

Issue 1757283002: Combine StrToInt methods. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 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
Index: fpdfsdk/src/javascript/util.cpp
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index 4bc28cd03a85230d73556787286ed0f185c7a015..a796d1489f01ffb3943ba4b809148003cefb99c3 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -529,8 +529,8 @@ int64_t FX_atoi64(const char* nptr) {
total = 0;
while (isdigit(c)) {
- total = 10 * total + FXSYS_toDecimalDigit(c); /* accumulate digit */
- c = (int)(unsigned char)*nptr++; /* get next char */
+ total = 10 * total + FXSYS_toDecimalDigit(static_cast<FX_WCHAR>(c));
+ c = (int)(unsigned char)*nptr++;
}
return sign == '-' ? -total : total;

Powered by Google App Engine
This is Rietveld 408576698