summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_bstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_basic_bstring.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index 1b9d7a0344..c706912d9d 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -5,7 +5,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include <stddef.h> // For offsetof().
-#include <cctype>
#include "../../include/fxcrt/fx_basic.h"
#include "../../../third_party/base/numerics/safe_math.h"
@@ -494,8 +493,8 @@ void CFX_ByteString::FormatV(const FX_CHAR* lpszFormat, va_list argList) {
}
if (nWidth == 0) {
nWidth = FXSYS_atoi(lpsz);
- while (std::isdigit(*lpsz))
- lpsz++;
+ for (; (*lpsz) >= '0' && (*lpsz) <= '9'; lpsz++)
+ ;
}
if (nWidth < 0 || nWidth > 128 * 1024) {
lpszFormat = "Bad width";
@@ -510,8 +509,8 @@ void CFX_ByteString::FormatV(const FX_CHAR* lpszFormat, va_list argList) {
lpsz++;
} else {
nPrecision = FXSYS_atoi(lpsz);
- while (std::isdigit(*lpsz))
- lpsz++;
+ for (; (*lpsz) >= '0' && (*lpsz) <= '9'; lpsz++)
+ ;
}
}
if (nPrecision < 0 || nPrecision > 128 * 1024) {