mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fixed bug in strtol*.
This commit is contained in:
parent
bf6a4c1861
commit
da2bfac34f
1 changed files with 2 additions and 1 deletions
|
@ -69,8 +69,9 @@ namespace Maxsi
|
||||||
}
|
}
|
||||||
if ( !base ) { base = 10; }
|
if ( !base ) { base = 10; }
|
||||||
if ( origbase == 16 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X') ) { str += 2; }
|
if ( origbase == 16 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X') ) { str += 2; }
|
||||||
while ( (c = *str++ ) )
|
while ( (c = *str ) )
|
||||||
{
|
{
|
||||||
|
str++;
|
||||||
int val = Debase(c);
|
int val = Debase(c);
|
||||||
if ( val < 0 ) { break; }
|
if ( val < 0 ) { break; }
|
||||||
if ( base <= val ) { break; }
|
if ( base <= val ) { break; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue