| Index: core/src/fpdftext/fpdf_text.cpp
|
| diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
|
| index 55ab4837221d1c7ea3c7c2c281ece957d31977fa..bef805189b9234441018d77751e9d5423d634320 100644
|
| --- a/core/src/fpdftext/fpdf_text.cpp
|
| +++ b/core/src/fpdftext/fpdf_text.cpp
|
| @@ -14,6 +14,8 @@
|
| #include "third_party/base/nonstd_unique_ptr.h"
|
| #include "txtproc.h"
|
|
|
| +#include <cctype>
|
| +
|
| CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode,
|
| int destcp,
|
| const FX_CHAR* defchar) {
|
| @@ -436,10 +438,9 @@ 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 ((ch < '0' || ch > '9') && ch != '-' && ch != '+' && ch != '.' &&
|
| - ch != ' ') {
|
| + // TODO(dsinclair): --.+ +.-- should probably not be a number.
|
| + if (!std::iswdigit(ch) && ch != '-' && ch != '+' && ch != '.' && ch != ' ')
|
| return FALSE;
|
| - }
|
| }
|
| return TRUE;
|
| }
|
|
|