diff options
Diffstat (limited to 'core/src/fpdftext/fpdf_text.cpp')
-rw-r--r-- | core/src/fpdftext/fpdf_text.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp index e9ad338025..9ecbc21bda 100644 --- a/core/src/fpdftext/fpdf_text.cpp +++ b/core/src/fpdftext/fpdf_text.cpp @@ -436,8 +436,10 @@ void NormalizeString(CFX_WideString& str) { static FX_BOOL IsNumber(CFX_WideString& str) { for (int i = 0; i < str.GetLength(); i++) { FX_WCHAR ch = str[i]; - if (!std::isdigit(ch) && ch != '-' && ch != '+' && ch != '.' && ch != ' ') + if ((ch < '0' || ch > '9') && ch != '-' && ch != '+' && ch != '.' && + ch != ' ') { return FALSE; + } } return TRUE; } |