Fixed String::IsNumber with base > 10

Former-commit-id: 18feb64e18e2b0a5360d9ae2b6dfea169ede4365
This commit is contained in:
Lynix 2014-04-04 11:37:48 +02:00
parent 7196d8399f
commit 04b9a13397
1 changed files with 4 additions and 4 deletions

View File

@ -2055,8 +2055,8 @@ bool NzString::IsNumber(nzUInt8 base, nzUInt32 flags) const
{
if (flags & CaseInsensitive)
{
char limitLower = 'a'+base-1;
char limitUpper = 'A'+base-1;
char limitLower = 'a' + base-10 - 1;
char limitUpper = 'A' + base-10 - 1;
do
{
@ -2068,7 +2068,7 @@ bool NzString::IsNumber(nzUInt8 base, nzUInt32 flags) const
}
else
{
char limit = 'a'+base-1;
char limit = 'a' + base-10 - 1;
do
{
char c = *ptr;
@ -2080,7 +2080,7 @@ bool NzString::IsNumber(nzUInt8 base, nzUInt32 flags) const
}
else
{
char limit = '0'+base-1;
char limit = '0' + base - 1;
do
{