Fixed String::IsNumber with base > 10
Former-commit-id: 18feb64e18e2b0a5360d9ae2b6dfea169ede4365
This commit is contained in:
parent
7196d8399f
commit
04b9a13397
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue