summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_basic_util.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index 46a0dec1e5..71119082a2 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -101,13 +101,13 @@ void FX_atonum(const CFX_ByteStringC& strc, FX_BOOL& bInteger, void* pData) {
cc++;
}
while (cc < len) {
- if (str[cc] < '0' || str[cc] > '9') {
+ if (!std::isdigit(str[cc]))
break;
- }
+
integer = integer * 10 + str[cc] - '0';
- if (integer < 0) {
+ if (integer < 0)
break;
- }
+
cc++;
}
if (bNegative) {