Fixed bug in strtol*.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-12-16 18:28:22 +01:00
parent bf6a4c1861
commit da2bfac34f
1 changed files with 2 additions and 1 deletions

View File

@ -69,8 +69,9 @@ namespace Maxsi
}
if ( !base ) { base = 10; }
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);
if ( val < 0 ) { break; }
if ( base <= val ) { break; }