[General]: Correct usage of isdigit

This commit is contained in:
FutureRave 2023-03-07 14:01:57 +00:00
parent 91d367c1c9
commit 6348dba85d
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31

View File

@ -246,7 +246,7 @@ namespace Components
for (i = 0; i < iTokenLen - 2; ++i) 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) if (bInsertEnabled)
{ {
@ -268,7 +268,7 @@ namespace Components
{ {
for (i = 0; i < iLen - 2; ++i) 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; const auto digit = pszString[i + 2] - 48;
if (!digit) if (!digit)