Skip to content

Commit 00771cc

Browse files
committed
Fix strto*() bug in stdlib.
1 parent 5326e79 commit 00771cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/stdlib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ static int atoi_digit(char c, int base)
17131713
else if (c >= 'a' && c <= 'z')
17141714
d = 10 + (c - 'a');
17151715
else if (c >= 'A' && c <= 'Z')
1716-
d = 10 + (c - 'Z');
1716+
d = 10 + (c - 'A');
17171717
if (d < 0)
17181718
return d;
17191719
if (d >= base)

0 commit comments

Comments
 (0)