Skip to content

Commit 4d5b37f

Browse files
committed
Fix strtoXXl() bug.
1 parent eaad7cc commit 4d5b37f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/stdlib.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,9 @@ static __int128 atoi_convert(const char * __restrict__ nptr,
17661766
*endptr = (char *)nptr;
17671767
errno = EINVAL;
17681768
return 0;
1769+
default:
1770+
base = (base == 0? 10: base);
1771+
break;
17691772
}
17701773

17711774
__int128 x = 0;

0 commit comments

Comments
 (0)