Merge pull request #815 from diamante0018/develop

[General]: Correct usage of isdigit
This commit is contained in:
Edo 2023-03-07 14:10:29 +00:00 committed by GitHub
commit 2ad42c2052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,7 @@ namespace Components
for (i = 0; i < iTokenLen - 2; ++i)
{
if (!std::strncmp(&szTokenBuf[i], "&&", 2) && std::isdigit(szTokenBuf[i + 2]))
if (!std::strncmp(&szTokenBuf[i], "&&", 2) && std::isdigit(static_cast<unsigned char>(szTokenBuf[i + 2])))
{
if (bInsertEnabled)
{
@ -268,7 +268,7 @@ namespace Components
{
for (i = 0; i < iLen - 2; ++i)
{
if (!std::strncmp(&pszString[i], "&&", 2) && std::isdigit(pszString[i + 2]))
if (!std::strncmp(&pszString[i], "&&", 2) && std::isdigit(static_cast<unsigned char>(pszString[i + 2])))
{
const auto digit = pszString[i + 2] - 48;
if (!digit)