From 105dcebb9e744a3ed57de6fd7c42b4cf42d0dd83 Mon Sep 17 00:00:00 2001 From: Rajendra Singh Date: Tue, 25 Jun 2019 22:59:54 +0530 Subject: [PATCH] Improved isAllDigits algo Close #4530, close #5828 --- PowerEditor/src/ScitillaComponent/AutoCompletion.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp index 497cb5e0..cc8a96c0 100644 --- a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp +++ b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp @@ -45,11 +45,7 @@ static bool isAllDigits(const generic_string &str) { for (const auto& i : str) { - if (i < -i || i > 255) - return false; - - bool isDigit = ::isdigit(int(i)) != 0; - if (!isDigit) + if (i < 48 || i > 57) return false; } return true;