diff options
author | Lei Zhang <thestig@chromium.org> | 2017-04-24 16:28:07 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-25 00:07:29 +0000 |
commit | ef002c85521278e3082517297cf60372d7751cb1 (patch) | |
tree | be0148d89603262c1bf11f16621a1c43509759db /core/fxcrt/cfx_decimal.cpp | |
parent | 3684a151e76991bc67dd397cba66b0620cc38bae (diff) | |
download | pdfium-ef002c85521278e3082517297cf60372d7751cb1.tar.xz |
Use fx_extension.h utilities in more places.
Change-Id: Iba1aa793567e69acc3cc1acbd5b9a9f531c80b7a
Reviewed-on: https://pdfium-review.googlesource.com/4453
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_decimal.cpp')
-rw-r--r-- | core/fxcrt/cfx_decimal.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fxcrt/cfx_decimal.cpp b/core/fxcrt/cfx_decimal.cpp index 095978cd43..a463305f6a 100644 --- a/core/fxcrt/cfx_decimal.cpp +++ b/core/fxcrt/cfx_decimal.cpp @@ -9,6 +9,8 @@ #include <algorithm> #include <utility> +#include "core/fxcrt/fx_extension.h" + #define FXMATH_DECIMAL_SCALELIMIT 0x1c #define FXMATH_DECIMAL_NEGMASK (0x80000000L) #define FXMATH_DECIMAL_FORCEBOOL(x) (!!(x)) @@ -310,7 +312,7 @@ CFX_Decimal::CFX_Decimal(const CFX_WideStringC& strObj) { str++; } - while (str != strBound && ((*str >= '0' && *str <= '9') || *str == '.') && + while (str != strBound && (std::iswdigit(*str) || *str == '.') && scale < FXMATH_DECIMAL_SCALELIMIT) { if (*str == '.') { if (!pointmet) |