Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning sign compare #2960

Merged
merged 1 commit into from
Jun 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Foundation/include/Poco/NumericString.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ bool strToInt(const char* pStr, I& outResult, short base, char thSep = ',')
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
{
char add = (*pStr - '0');
unsigned char add = (*pStr - '0');
if ((limitCheck - result) < add) return false;
result = result * base + add;
}
Expand All @@ -225,7 +225,7 @@ bool strToInt(const char* pStr, I& outResult, short base, char thSep = ',')
case '8': case '9':
if ((base == 10) || (base == 0x10))
{
char add = (*pStr - '0');
unsigned char add = (*pStr - '0');
if ((limitCheck - result) < add) return false;
result = result * base + add;
}
Expand All @@ -236,7 +236,7 @@ bool strToInt(const char* pStr, I& outResult, short base, char thSep = ',')
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
{
if (base != 0x10) return false;
char add = (*pStr - 'a');
unsigned char add = (*pStr - 'a');
if ((limitCheck - result) < add) return false;
result = result * base + (10 + add);
}
Expand All @@ -245,7 +245,7 @@ bool strToInt(const char* pStr, I& outResult, short base, char thSep = ',')
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
{
if (base != 0x10) return false;
char add = (*pStr - 'A');
unsigned char add = (*pStr - 'A');
if ((limitCheck - result) < add) return false;
result = result * base + (10 + add);
}
Expand Down